1 (edited by guido.rugo 2013-05-18 04:33:47)

Topic: [SOLVED] status=deferred (temporary failure)

======== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian Squeeze
- Related log if you're reporting an issue:

Attached syslog (same as mail.log)

status=deferred (temporary failure) sending mail to the same domain

# postconf -n
alias_maps = mysql:/etc/postfix/mysql/domain_alias_maps.cf
allow_min_user = no
allow_percent_hack = no
append_dot_mydomain = no
biff = no
bounce_queue_lifetime = 2h
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
delay_warning_time = 0h
disable_vrfy_command = yes
enable_original_recipient = no
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 0
maximal_backoff_time = 4000s
maximal_queue_lifetime = 2h
message_size_limit = 15728640
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
mydomain = jboss.dojo
myhostname = debian.dojo
mynetworks = 127.0.0.0/8
mynetworks_style = subnet
myorigin = $myhostname
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_mailbox_domains $smtpd_sender_restrictions $virtual_mailbox_maps
queue_run_delay = 1s
readme_directory = no
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/relay_domains.cf
relayhost =
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = no
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_reject_unlisted_recipient = no
smtpd_reject_unlisted_sender = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_local_domain =
smtpd_sasl_path = ./dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
smtpd_tls_CAfile = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
smtpd_tls_loglevel = 3
smtpd_tls_security_level = may
swap_bangpath = no
tls_random_source = dev:/dev/urandom
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
virtual_gid_maps = static:8
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_minimum_uid = 150
virtual_transport = dovecot
virtual_uid_maps = static:150





Answer:
For anyone that got this problem, check in /etc/groups and /etc/passwd that vmail got a correct UID and GID

Post's attachments

syslog.txt 3.44 kb, 3 downloads since 2013-05-16 

You don't have the permssions to download the attachments of this post.

2

Re: [SOLVED] status=deferred (temporary failure)

guido.rugo wrote:

May 16 14:57:03 debian postfix/pipe[11139]: 4BBA9F40067: to=<x@jboss.dojo>, relay=dovecot, delay=0.04, delays=0.01/0.01/0/0.03, dsn=4.3.0, status=deferred (temporary failure)

The error was caused by Dovecot/Sieve during delivering email to user mailbox. Please find related log in Dovecot log files: /var/log/dovecot.log and /var/log/sieve.log.

3 (edited by guido.rugo 2013-05-17 08:22:39)

Re: [SOLVED] status=deferred (temporary failure)

Sending mail to mailself.

dovecot.log
May 16 21:18:48 auth(default): Info: new auth connection: pid=17861
May 16 21:18:48 auth(default): Info: master in: USER    1       x@jboss.dojo    service=deliver
May 16 21:18:48 auth-worker(default): Info: sql(x@jboss.dojo): SELECT 'x@jboss.dojo' AS master_user, CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, CONCAT('*:bytes=', mailbox.quota*1048576) AS quota_rule FROM mailbox,domain WHERE mailbox.username='x@jboss.dojo' AND mailbox.domain='jboss.dojo' AND mailbox.`enabledeliver`=1 AND mailbox.domain=domain.domain AND domain.backupmx=0 AND domain.active=1 AND mailbox.active=1
May 16 21:18:48 auth(default): Info: master out: USER   1       x@jboss.dojo    master_user=x@jboss.dojo        home=/var/vmail/vmail1/jboss.dojo/x/x/x/x-2013.05.15.15.38.05/  quota_rule=*:bytes=1073741824


Dont see any error.


Edit:
Find it.
Fatal: setgid(8(mail)) failed with euid=150(vmail), gid=2000(vmail), egid=2000(vmail): Operation not permitted (This binary should probably be called with process group set to 8(mail) instead of 2000(vmail))

4

Re: [SOLVED] status=deferred (temporary failure)

What's the value of "mail_uid =" and "mail_gid =" in your Dovecot config file (/etc/dovecot/dovecot.conf)? They should be set to uid/gid of system user "vmail", not "mail".

5 (edited by guido.rugo 2013-05-17 08:28:03)

Re: [SOLVED] status=deferred (temporary failure)

# mail uid/gid.
mail_uid = 150
mail_gid = 8
first_valid_uid = 150
last_valid_uid = 150

And my passwd is
vmail:x:150:8:Virtual mailbox:/var/vmail:/sbin/nologin
dovecot:x:106:110:Dovecot mail server,,,:/usr/lib/dovecot:/bin/false
spamd:x:5001:5001::/var/lib/spamassassin:/sbin/nologin
clamav:x:107:111::/var/lib/clamav:/bin/false
amavis:x:108:112:AMaViS system user,,,:/var/lib/amavis:/bin/sh
iredadmin:x:2001:2001::/home/iredadmin:/usr/sbin/nologin
iredapd:x:2002:2002::/home/iredapd:/usr/sbin/nologin
policyd:x:5002:5002::/home/policyd:/usr/sbin/nologin

6

Re: [SOLVED] status=deferred (temporary failure)

*) Mailboxes are stored under /var/vmail, it must be owned by vmail usre/group.
*) As mentioned in my previous rely, mail_uid/mail_gid must be uid/gid number of system user "vmail".

So, personally, i suggest you try to modify uid/gid of vmail user to 2000/2000. Then reboot your server and test again.
That should be:

mail_uid = 2000
mail_gid = 2000

first_valid_uid = 2000
last_valid_uid = 2000

7 (edited by guido.rugo 2013-05-18 04:32:25)

Re: [SOLVED] status=deferred (temporary failure)

Done. I got vmail as UID 150 and GID as 2000. Thanks.