1 (edited by insanadair 2011-09-22 15:27:49)

Topic: Failed to write to log file

I have a iredmail 0.7.3 Backround Mysql  and work Debian Linux. 

Output of this "mailq"command and I changed real domain name with xyz.com

I havent got a agaya@xyz.com and root@xyz.com I didnt found this accounts. How can I fixs this errors ?

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
27BB1E8097     4962 Wed Sep 21 19:10:00  MAILER-DAEMON
              (temporary failure. Command output: Failed to write to log file)
                                         agaya@xyz.com
                                         root@xyz.com

28D07E8098     5049 Wed Sep 21 19:10:00  MAILER-DAEMON
              (temporary failure. Command output: Failed to write to log file)
                                         agaya@xyz.com
                                         root@xyz.com

2C3A0E80A7      770 Wed Sep 21 06:25:14  root@mail.mems.metu.edu.tr
              (temporary failure. Command output: Failed to write to log file)
                                         agaya@xyz.com
                                         root@xyz.com

8AB6EE8094     4963 Wed Sep 21 18:00:00  MAILER-DAEMON
              (temporary failure. Command output: Failed to write to log file)
                                         agaya@xyz.com
                                         root@xyz.com

8E09DE8091     4981 Wed Sep 21 18:00:00  MAILER-DAEMON
              (temporary failure. Command output: Failed to write to log file)
                                         agaya@xyz.com
                                         root@xyz.com

53E80E809B     2591 Wed Sep 21 06:55:00  MAILER-DAEMON
              (temporary failure. Command output: Failed to write to log file)
                                         agaya@xyz.com
                                         root@xyz.com

-- 23 Kbytes in 6 Requests.

Output of this "postconf -n"command

mail:~# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
append_dot_mydomain = no
biff = no
bounce_queue_lifetime = 1d
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
header_checks = pcre:/etc/postfix/header_checks.pcre
home_mailbox = Maildir/
inet_interfaces = all
mail_name = iRedMail
mail_version = 0.5.1
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 15728640
maximal_backoff_time = 4000s
maximal_queue_lifetime = 1d
message_size_limit = 15728640
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
mydomain = xxxx
myhostname = xxxxxx
mynetworks = 127.0.0.0/8
mynetworks_style = subnet
myorigin = xxxxxxx
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_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions
queue_run_delay = 300s
readme_directory = no
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_user.cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql_relay_domains.cf
relay_recipient_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
relayhost =
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_user.cf
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_enforce_tls = no
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_policy_service inet:[127.0.0.1]:10031
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
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, permit_sasl_authenticated
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
smtpd_tls_loglevel = 0
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
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_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql_domain_alias_maps.cf, proxy:mysql:/etc/postfix/catchall_maps.cf, proxy:mysql:/etc/postfix/domain_alias_catchall_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /home/vmail/vmail01
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 = 1001
virtual_transport = dovecot
virtual_uid_maps = static:1001

tail -f /var/log/mail.log

Sep 21 21:37:14 mail postfix/qmgr[2945]: 27BB1E8097: from=<>, size=4962, nrcpt=1 (queue active)
Sep 21 21:37:14 mail postfix/qmgr[2945]: 28D07E8098: from=<>, size=5049, nrcpt=1 (queue active)
Sep 21 21:37:14 mail postfix/qmgr[2945]: 8AB6EE8094: from=<>, size=4963, nrcpt=1 (queue active)
Sep 21 21:37:14 mail postfix/qmgr[2945]: 8E09DE8091: from=<>, size=4981, nrcpt=1 (queue active)
Sep 21 21:37:14 mail postfix/local[3643]: 27BB1E8097: to=<agaya@xyz.com>, relay=local, delay=8834, delays=8834/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: Failed to write to log file)
Sep 21 21:37:14 mail postfix/local[3644]: 28D07E8098: to=<agaya@xyz.com>, relay=local, delay=8834, delays=8834/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: Failed to write to log file)
Sep 21 21:37:14 mail postfix/local[3644]: 8E09DE8091: to=<agaya@xyz.com>, relay=local, delay=13034, delays=13034/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: Failed to write to log file)
Sep 21 21:37:14 mail postfix/local[3643]: 8AB6EE8094: to=<agaya@xyz.com>, relay=local, delay=13034, 
delays=13034/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: Failed to write to log file)

ls -alh /var/log/mail* output of command

-rw-r-----  1 root        adm    688K 2011-09-22 08:51 mail.err
-rw-r-----  1 root        adm    155M 2011-09-22 10:06 mail.info
-rw-------  1 root        root   110M 2011-09-22 10:06 mail.log
-rw-------  1 root        root    27K 2011-03-30 06:01 mail.log.10.bz2

output of -->  /etc/postfix/mysql_virtual_mailbox_domains.cf

user        = vmail
password    = xxxxxxx
hosts       = 127.0.0.1
port        = 3306
dbname      = vmail
query       = SELECT domain FROM domain WHERE domain='%s' AND backupmx=0 AND active=1 UNION SELECT alias_domain.alias_domain FROM alias_domain,domain WHERE alias_domain.alias_domain='%s' AND alias_domain.active=1 AND alias_domain.target_domain=domain.domain AND domain.active=1 AND domain.backupmx=0
#query       = SELECT domain FROM domain WHERE domain='%s' AND backupmx='0' AND active='1' AND expired >= NOW()

Thank you for your help

2

Re: Failed to write to log file

- Do you have a unix account "agaya" on this server?
- Is there any application/daemon running as unix user "agaya"?
- Is there any application which will send mail to local unix account "agaya"?

3 (edited by insanadair 2011-09-22 19:21:38)

Re: Failed to write to log file

I havent got a mail user account on iredmail but I have user account on machine

output of command "uid"

uid=1000(agaya) gid=1000(agaya) groups=1000(agaya),20(dialout),24(cdrom),25(floppy),29(audio),44(video),46(plugdev)

How can I remove "Failed to write to log file" error.  Same error view root users What can I do ?  My Machine is debian lenny

-Is there any application/daemon running as unix user "agaya"?   ( NO )
-Is there any application which will send mail to local unix account "agaya"?  ( NO )
-Do you have a unix account "agaya" on this server?  ( YES )

Root user same error

61DC1E809C      770 Thu Sep 22 06:25:15  root@xyz.com
              (temporary failure. Command output: Failed to write to log file)
                                         agaya@xyz.com
                                         root@xyz.com

4

Re: Failed to write to log file

Does this user have crontab jobs?

One solution to avoid this issue: Forward all mails sent to this account to a real mail user.
You can add one entry in /etc/postfix/aliases:

agaya: real_user@domain.ltd

After adding this line, run postfix command to make it work:

# postalias /etc/postfix/aliases

Postfix will detect this change and load it automatically.