Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In my pflogsumm report I noticed suddenly a lot of deferred mails, so I went to check the server through which we relay mails for certain domains and found out that the servers uptime was two days, which means it got restarted 2 days ago. The company at which we bought this VPS wouldn't give us any additional information to as why this happened. I checked the postfix service (and restarted also) but I get a normal service working status:

# service postfix status
master (pid 12151) is running...

I tried to telnet to the server and got this error:

telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 vps244231-1.lcnservers.com ESMTP Postfix
HELO vps244231-1.lcnservers.com
250 vps244231-1.lcnservers.com
MAIL FROM:<mail@mydomain.com> <- here i used the real existing email
451 4.7.1 Service unavailable - try again later

I googled for 'Service unavailable' error but can't come up with any decent solution. Do you have any ideas what could be wrong?

My postconf is as follows (I browsed other similar questions and saw people post this setting so I did too):

# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 10240000
mydestination = localhost.$mydomain, localhost, localhost.localdomain
myhostname = vps244231-1.lcnservers.com
mynetworks = 127.0.0.0/8 [::1]/128 178.18.125.195/32 178.18.125.238/32 31.222.191.39/32
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:localhost:12768
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.8.4/README_FILES
sample_directory = /usr/share/doc/postfix-2.8.4/samples
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_send_xforward_command = yes
smtp_tls_security_level = none
smtp_use_tls = no
smtpd_authorized_xforward_hosts = 127.0.0.0/8 [::1]/128
smtpd_client_restrictions = permit_mynetworks
smtpd_milters = inet:localhost:12768
smtpd_proxy_timeout = 3600s
smtpd_recipient_restrictions = permit_mynetworks, check_client_access pcre:/var/spool/postfix/plesk/no_relay.re, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated, check_client_access pcre:/var/spool/postfix/plesk/non_auth.re
smtpd_timeout = 3600s
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_security_level = may
smtpd_use_tls = yes
transport_maps = hash:/var/spool/postfix/plesk/transport, hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_gid_maps = static:31
virtual_mailbox_base = /var/qmail/mailnames
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_mailbox_maps = hash:/var/spool/postfix/plesk/vmailbox
virtual_transport = plesk_virtual
virtual_uid_maps = static:110

If I can add some more info to help you help me, please say so (obviously I'm not good at the server part, so please excuse me if I made some errors). I have to stress that this mail server was working fine for I would say like at least 6 months now.

edit: I restarted the server one more time and now the mails are comming through just as normal, which is ofc good, but I have no idea why this happened. One strange thing still though is that even though my syslog deamon is running, and the space is not occupied, I still don't see any logs in /var/log/maillog:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              50G  2.4G   48G   5% /
none                  1.0G  4.0K  1.0G   1% /dev
/dev/vzfs              50G  2.4G   48G   5% /var/named/run-root/var/run/dbus

# service syslog status
syslogd (pid  4085) is running...
# cat /var/log/maillog
#
share|improve this question
    
Postfix log would be useful, /var/log/mail or /var/log/maillog is a likely place for it. –  Dennis Kaarsemaker Jan 28 '13 at 12:55
    
@DennisKaarsemaker: my /var/log/maillog is empty (it's Centos btw). But, on the server from which we relay that maillog contains lines like this for example: Jan 28 13:01:28 mail postfix/smtp[15415]: 590F121C4DC: to=<email@hotmail.com>, relay=178.18.125.195[178.18.125.195]:25, conn_use=3, delay=90377, delays=90329/48/0/0, dsn=4.7.1, status=deferred (host 178.18.125.195[178.18.125.195] said: 451 4.7.1 Service unavailable - try again later (in reply to MAIL FROM command)) –  Nikola Jan 28 '13 at 13:00
    
If /var/log/maillog is empty, your syslog config is broken too. Or syslog isn't running. Or syslog can't write because the filesystem is read-only. Given the unexpected restart, it may have been a crash and your filesystem is broken. I'd check all of these things, starting with "is the filesystem readonly" as that's easiest to check. –  Dennis Kaarsemaker Jan 28 '13 at 13:07
    
@DennisKaarsemaker: please take a look at my edit. –  Nikola Jan 28 '13 at 14:03
add comment

2 Answers

up vote 0 down vote accepted

451 4.7.1 Service unavailable - try again later after connecting is indicative of a problem with the queue - most likely postfix cannot write the queue file, and hence is forced to temp reject your message.

As Dennis said, check the availability and free space on your /var/ partition - this holds both the postfix queue and the log file.

Another possibility is that smtpd_milters = inet:localhost:12768 is not running - but that would not explain the absence of logs.

share|improve this answer
    
please see my edit –  Nikola Jan 28 '13 at 14:02
    
This is some sort of virtualization setup; I suggest you contact the VPS provider for more info on possible issues. Postfix logs to the mail facility of syslog; as already said elsewhen, that's where you need to look for logging issues. –  adaptr Jan 28 '13 at 14:34
add comment

Just check /var/log/syslog

In my case it was problem with security:

Jan 11 17:57:34 konkib opendkim[2375]: mail._domainkey.mydomain.com: key data is not secure: /etc/postfix/dkim/mail.private is in group 110 which has multiple users (e.g., "remotebkp")
Jan 11 17:57:34 konkib opendkim[2375]: 24B2112081D: error loading key 'mail._domainkey.mydomain.com' Jan 11 17:57:34 konkib postfix/cleanup[17011]: 24B2112081D: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 4.7.1 Service unavailable - try again later; from=<logcheck@mydomain.com> to=<logcheck@mydomain.com>

It works after editing /etc/groups.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.