Postfix/Cyrus "명령 시간 제한 초과"에 대한 시간 초과를 늘리시겠습니까?

Postfix/Cyrus "명령 시간 제한 초과"에 대한 시간 초과를 늘리시겠습니까?

나는 사서함 전송으로 cyrus를 사용하도록 구성된 Postfix 2.1.5를 실행하는 오래된 OS X Server 10.4.x를 가지고 있습니다.

postconf -n은 다음과 같습니다.

# postconf -n
alias_maps = hash:/etc/aliases,hash:/var/mailman/data/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
enable_server_options = yes
html_directory = no
inet_interfaces = all
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
luser_relay = 
mail_owner = postfix
mailbox_size_limit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maps_rbl_domains = 
message_size_limit = 15728640
mydestination = $myhostname,localhost.$mydomain,livingnow.com.au,localhost
mydomain = livingnow.com.au
mydomain_fallback = localhost
myhostname = server.livingnow.com.au
mynetworks = 127.0.0.1/32,192.168.16.0/24
mynetworks_style = host
newaliases_path = /usr/bin/newaliases
owner_request_special = no
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_client_restrictions = permit_mynetworks  reject_rbl_client sbl-xbl.spamhaus.org reject_rbl_client bl.spamcop.net permit
smtpd_pw_server_security_options = cram-md5,login,plain
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,permit
smtpd_sasl_auth_enable = yes
smtpd_tls_key_file = 
smtpd_use_pw_server = yes
unknown_local_recipient_reject_code = 550

때때로 킥스타트(곧 전체 서버 교체)가 필요하지만 문제가 있는 경우 전달할 수 없다는 알림이 다음과 함께 전송됩니다.

Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; Command time limit exceeded:
   "/usr/bin/cyrus/bin/deliver"

master.cf에서 해당 명령은 다음과 같이 나열됩니다.

# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus     unix  -       n       n       -       10      pipe
  user=cyrusimap argv=/usr/bin/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}

우리는 일반적으로 문제를 감지하고 이를 해결하는 서비스를 다시 시작하지만 오늘은 문제를 감지하는 데 한두 시간이 걸렸고 많은 발신자가 이 알림을 받았는데 이는 이상적이지 않습니다.

명령 시간 제한을 늘리는 방법이 있습니까?

답변1

이 답변은 주제와 거의 관련이 없지만 Cyrus가 충분히 오래되었거나(v2.1.x 이전) 나중에 소개된 Skiplist 대신 BerkeleyDB 백엔드를 사용하는 경우 실제로 Cyrus를 수정하는 데 도움이 될 수 있습니다.

이전 Cyrus IMAPd의 문제점은 기본적으로 BerkeleyDB가 BDB의 기본 설정을 사용하고 있다는 것입니다. 기본값은 엄청나게 작습니다. 256킬로바이트메모리 내 캐시 등. Cyrus에 전달할 메일이 많으면 BerkeleyDB 교착 상태가 매우 빨리 발생합니다.

현재 Cyrus BerkeleyDB 상태를 확인하려면:

cd /path/to/your/cyrus/datadir (the dir with mailboxes.db and so on)
db_stat -m *.db

( db_stat명령은 XY 형식일 수 있습니다 db_XYstat. 여기서 XY는 BerkeleyDB 버전을 나타냅니다.)

캐시 크기 값이 매우 낮은 것으로 표시되면 계속해서 원하는 대로 늘리십시오.

먼저 Cyrus를 중지하고 해당 데이터 디렉터리의 백업 복사본을 만드십시오.

그런 다음 데이터 디렉터리에 'DB_CONFIG'라는 파일을 만들고 최소한 다음 줄을 포함하도록 만듭니다.

set_cachesize    0   16777216  0

그러면 인메모리 캐시 크기가 16MB로 늘어나 대규모 설치에도 충분합니다.

DB_CONFIG 파일이 Cyrus와 동일한 사용자 계정의 소유인지 확인하세요.

캐시 변경 사항을 실제로 활성화하려면 무서운 이름의 명령 db_recover(. 형식일 수도 있음) 을 실행 dbXY_recover하십시오. 예를 들어 루트가 아닌 Cyrus 사용자로 명령을 실행해야 합니다.

Cyrus를 다시 시작하고 작동하는지 확인한 후 db_stat -m *.db다시 실행하여 값이 변경되었는지 확인하세요.

관련 정보