AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-117028

Jacob's questions

Martin Hope
Jacob
Asked: 2020-08-18 23:41:36 +0800 CST

筛选过滤器从子地址中删除详细信息部分

  • 0

我目前有一个筛滤器,如下所示:

require ["variables", "envelope", "fileinto", "vnd.dovecot.filter", "subaddress"];
if envelope :matches "to" "*" {
        set :lower "my_recipient" "${1}";
        filter ".." "${my_recipient}";
        fileinto "INBOX";
}

这很好用。但是我的过滤器当前无法正确处理子地址,例如:ken+sieve@example.org

所以我想将my_recipient变量设置为 ken@example.org 以使过滤器正常工作,即使信封设置为 ken+sieve@example.org

我已经阅读了子地址文档,我可以看到如何获取user部分或domain部分,但不知道如何获取完整地址,包括没有detail部分的域。我怎么能做到这一点?

email dovecot sieve
  • 1 个回答
  • 104 Views
Martin Hope
Jacob
Asked: 2015-11-20 12:06:37 +0800 CST

exim:远程 smtp 中继 smarthost 的不同密码

  • 0

目前我将我的 exim 配置设置为使用外部 SMTP 服务器发送所有电子邮件。所有用户使用本地密码向我的 exim 服务器进行身份验证,然后发送的消息通过智能主机中继到远程 SMTP 服务器,与连接到我的 exim 服务器(运行 cPanel)的用户直接使用的登录相比,该服务器使用不同的登录名. 这是当前的配置:

remote_route:
  driver = manualroute
  domains = !+local_domains
  transport = remote_transport
  route_list = * remotesmtpserver.com

remote_transport:
  driver = smtp
  port = 587
  hosts_require_auth = <; $host_address
  hosts_require_tls = <; $host_address

remote_login:
  driver = plaintext
  public_name = LOGIN
  hide client_send = : remote_username : remote_password

这一切都运作良好且符合预期。

问题是我想为一组选定的用户/发件人使用不同的 remote_username 和 remote_password。登录名(对于我的 exim 服务器)是完整的电子邮件地址,因此我已将这些电子邮件地址添加到文件 /etc/differentlogin(即,由新行分隔的电子邮件地址列表)。

然后我在 remote_login 部分尝试了以下设置:

remote_login:
  driver = plaintext
  public_name = LOGIN
  hide client_send = ${lookup{$authenticated_id}lsearch{/etc/differentlogin}{: different_username : different_passsword}{: remote_username : remote_password}

但是,这在尝试发送电子邮件时给了我以下 EXIM 错误:

  == to@address.com R=remote_route T=remote_transport defer (-48): expansion of "${lookup{$authenticated_id}lsearch{/etc/differentlogin}{" failed in mandrill_login authenticator: missing } at end of string

我尝试使用 $sender_address 而不是 $authenticated_id,但这给了我相同的结果。

我还尝试用字符串替换要搜索的变量,即:

remote_login:
  driver = plaintext
  public_name = LOGIN
  hide client_send = ${lookup{email@domain.com}lsearch{/etc/differentlogin}{: different_username : different_passsword}{: remote_username : remote_password}

但我仍然得到同样的错误。

为了检查我的条件语法,我尝试将以下内容添加到我的 remote_transport:

headers_add = X-SenderTest: ${lookup{$authenticated_id}lsearch{/etc/differentlogin}{different}{normal}}

这可以按预期工作,并在从 /etc/differentlogin 列表中记录的地址/登录名发送电子邮件时添加以下标题

X-SenderTest: different

有小费吗?

非常感谢

smtp
  • 1 个回答
  • 753 Views
Martin Hope
Jacob
Asked: 2015-11-16 11:49:01 +0800 CST

Exim:文件查找条件

  • 0

我在 Exim 中有一个传输设置,我为某些用户添加了一个特殊的标头 - 并为其余用户添加了不同的标头值。我已尝试创建正确的语法来添加此标头,但遇到了一些问题。

我目前的代码是:

headers_add = X-SenderTest: {${lookup{$sender_address}lsearch{/etc/addresses}{header1}{header2}}}

因此,如果 $sender_address 在文件 /etc/addresses 中(只是新行电子邮件地址的列表),我想要以下标题:

X-SenderTest: header1

对于我想要的所有其他 $sender_address :

X-SenderTest: header2

但是我实际得到的是:

X-SenderTest: {header1} or 
X-SenderTest: {header2}

我尝试了多种删除 { 括号的组合,但没有任何运气得到各种语法错误。

例如以下:

 X-SenderTest: {${lookup{$sender_address}lsearch{/etc/probanalogin}Prob no-Prob}}

给出这个语法错误:

failed to expand headers_add or headers_remove: missing or misplaced { or }

任何帮助将不胜感激。

exim
  • 1 个回答
  • 359 Views
Martin Hope
Jacob
Asked: 2015-05-04 01:49:39 +0800 CST

软突袭 1 慢(磁盘故障?)

  • 1

我正在运行带有 Software Raid 1 的服务器,它仅用于使用 Idera/R1Soft 进行备份。最近几天,备份生成非常缓慢,所以我开始怀疑是否存在磁盘问题。但是我不确定是否是这种情况,所以希望有人可以帮助我诊断这个问题。

以下是磁盘的大量信息,如果需要其他信息,请告诉我。这些驱动器看起来是否健康,或者似乎是什么问题?备份软件保存到 /home/ 分区,所以这可能是问题所在。

如果其中一个磁盘出现故障,我需要向服务器提供商发送证明,我应该发送什么?

非常感谢!

mdadm.conf

DEVICES /dev/[hs]d*
ARRAY /dev/md/0  metadata=1.0 UUID=77f79cbb:769b739a:61e3078d:baa387d3 name=rescue:0
ARRAY /dev/md/1  metadata=1.0 UUID=07982091:3873fa5c:5308f9a4:7be6239d name=rescue:1
ARRAY /dev/md/2  metadata=1.0 UUID=9faef154:1550a09e:b8a9f3a5:792ec8f7 name=rescue:2
ARRAY /dev/md/3  metadata=1.0 UUID=21d130c8:d3d06125:80436cbf:f30ca896 name=rescue:3

/proc/mdstat

Personalities : [raid1] 
md1 : active raid1 sda2[0] sdb2[1]
      524224 blocks super 1.0 [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
      8388596 blocks super 1.0 [2/2] [UU]

md3 : active raid1 sda4[0] sdb4[1]
      1847609660 blocks super 1.0 [2/2] [UU]
      [>....................]  check =  1.5% (28544512/1847609660) finish=30485.4min speed=994K/sec
      bitmap: 6/14 pages [24KB], 65536KB chunk

md2 : active raid1 sda3[0] sdb3[1]
      1073741688 blocks super 1.0 [2/2] [UU]
        resync=DELAYED

unused devices: <none>

lsblk

NAME    MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda       8:0    0  2.7T  0 disk  
├─sda1    8:1    0    8G  0 part  
│ └─md0   9:0    0    8G  0 raid1 [SWAP]
├─sda2    8:2    0  512M  0 part  
│ └─md1   9:1    0  512M  0 raid1 /boot
├─sda3    8:3    0    1T  0 part  
│ └─md2   9:2    0 1024G  0 raid1 /
├─sda4    8:4    0  1.7T  0 part  
│ └─md3   9:3    0  1.7T  0 raid1 /home
└─sda5    8:5    0    1M  0 part  
sdb       8:16   0  2.7T  0 disk  
├─sdb1    8:17   0    8G  0 part  
│ └─md0   9:0    0    8G  0 raid1 [SWAP]
├─sdb2    8:18   0  512M  0 part  
│ └─md1   9:1    0  512M  0 raid1 /boot
├─sdb3    8:19   0    1T  0 part  
│ └─md2   9:2    0 1024G  0 raid1 /
├─sdb4    8:20   0  1.7T  0 part  
│ └─md3   9:3    0  1.7T  0 raid1 /home
└─sdb5    8:21   0    1M  0 part 

smartctl -a /dev/sda4

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-123.20.1.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.14 (AF)
Device Model:     ST3000DM001-1CH166
Serial Number:    Z1F0S2S6
LU WWN Device Id: 5 000c50 04dc90878
Firmware Version: CC43
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun May  3 11:44:10 2015 CEST

==> WARNING: A firmware update for this drive may be available,
see the following Seagate web pages:
http://knowledge.seagate.com/articles/en_US/FAQ/207931en
http://knowledge.seagate.com/articles/en_US/FAQ/223651en

SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (  575) seconds.
Offline data collection
capabilities:            (0x73) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   1) minutes.
Extended self-test routine
recommended polling time:    ( 324) minutes.
Conveyance self-test routine
recommended polling time:    (   2) minutes.
SCT capabilities:          (0x3085) SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   117   099   006    Pre-fail  Always       -       162055184
  3 Spin_Up_Time            0x0003   092   092   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       9
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       24
  7 Seek_Error_Rate         0x000f   077   050   030    Pre-fail  Always       -       43512399126
  9 Power_On_Hours          0x0032   074   074   000    Old_age   Always       -       23095
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       9
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0 0 0
189 High_Fly_Writes         0x003a   075   075   000    Old_age   Always       -       25
190 Airflow_Temperature_Cel 0x0022   068   062   045    Old_age   Always       -       32 (Min/Max 25/33)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       6
193 Load_Cycle_Count        0x0032   097   097   000    Old_age   Always       -       7646
194 Temperature_Celsius     0x0022   032   040   000    Old_age   Always       -       32 (0 21 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       23095h+14m+28.598s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       130844533886
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       310965085514

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%     20851         -
# 2  Extended offline    Completed without error       00%     20833         -
# 3  Extended offline    Completed without error       00%     20827         -
# 4  Extended offline    Completed without error       00%     20822         -
# 5  Extended offline    Completed without error       00%         5         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

smartctl -a /dev/sdb4

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-123.20.1.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 3.5" HDD DT01ACA...
Device Model:     TOSHIBA DT01ACA300
Serial Number:    94KK14MGS
LU WWN Device Id: 5 000039 ff4e3eda1
Firmware Version: MX6OABB0
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun May  3 11:45:48 2015 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x84) Offline data collection activity
                    was suspended by an interrupting command from host.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (22365) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   1) minutes.
Extended self-test routine
recommended polling time:    ( 373) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   140   140   054    Pre-fail  Offline      -       69
  3 Spin_Up_Time            0x0007   100   100   024    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       2
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   124   124   020    Pre-fail  Offline      -       33
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       2268
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       2
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       4
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       4
194 Temperature_Celsius     0x0002   181   181   000    Old_age   Always       -       33 (Min/Max 25/36)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%        24         -
# 2  Extended offline    Completed without error       00%         5         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
software-raid
  • 1 个回答
  • 744 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve