# Postfix lost connection



## murias (Jan 31, 2013)

Hello,

I have put some upgrades into service today.  Did a whole clean install of FreeBSD 9.1 onto a drive then installed the drive into the machine at the datacenter.  It seemed that all was fine until I got back to the office and found that Postfix is not delivering any emails at all.  It holds them in queue.  Does not matter if they should be delivered locally or sent out across the ether to another machine.  All my users can connect to check or send email, but once it leaves their client application, it gets stuck on the server.  Any inbound for them gets stuck in queue.

I try to follow the guide at purplehat.org.  Never had fault with it before.  One main difference between his config and mine is that I am using Dovecot2 and not Dovecot1.  Since this was going into an already configured server, I mainly copied the configure files over, with only slight modifications to them.  So I am really perplexed.

Here is a sampling from the maillog:

```
Jan 30 17:23:58 ogham postfix/smtpd[5335]: connect from ens2.gps.caltech.edu[131.215.68.127]
Jan 30 17:23:58 ogham postfix/smtpd[5335]: 5784E1FD7C1: client=ens2.gps.caltech.edu[131.215.68.127]
Jan 30 17:23:58 ogham postfix/cleanup[5339]: 5784E1FD7C1: message-id=<20130131012410.098613710E3@ens2.gps.caltech.edu>
Jan 30 17:23:58 ogham postfix/smtpd[5335]: disconnect from ens2.gps.caltech.edu[131.215.68.127]
Jan 30 17:23:58 ogham postfix/qmgr[3942]: 5784E1FD7C1: from=<ens@usgs.gov>, size=2356, nrcpt=1 (queue active)
Jan 30 17:23:58 ogham postfix/error[5340]: 5784E1FD7C1: to=<murias@dragonsblood.net>, relay=none, delay=0.19, delays=0.18/0.01/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jan 30 17:28:11 ogham postfix/qmgr[3942]: 807251FD7CF: from=<ens@usgs.gov>, size=2237, nrcpt=1 (queue active)
Jan 30 17:28:11 ogham postfix/qmgr[3942]: 8EFFB1FD79B: from=<ens@usgs.gov>, size=2191, nrcpt=1 (queue active)
Jan 30 17:28:11 ogham postfix/qmgr[3942]: 83EEB1FD7DF: from=<ens@usgs.gov>, size=2292, nrcpt=1 (queue active)
Jan 30 17:28:11 ogham postfix/qmgr[3942]: 26AF61FD7C9: from=<ens@usgs.gov>, size=2274, nrcpt=1 (queue active)
Jan 30 17:28:11 ogham postfix/error[5411]: A17D01FD7A6: to=<dave@orangediesel.com>, relay=none, delay=8683, delays=8683/0.17/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jan 30 17:28:11 ogham postfix/smtp[5405]: 26AF61FD7C9: to=<murias@dragonsblood.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=5898, delays=5898/0.07/0.09/0.02, dsn=4.4.2, status=deferred (lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
```

and here is the output of postconf:

```
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = /usr/local/share/doc/postfix
inet_protocols = ipv4
mail_owner = postfix
mailbox_size_limit = 0
mailman_destination_recipient_limit = 1
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 0
mydestination = localhost.$mydomain, localhost
mydomain = developyour.net
myhostname = ogham.developyour.net
mynetworks_style = host
newaliases_path = /usr/local/bin/newaliases
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
queue_directory = /var/spool/postfix
readme_directory = /usr/local/share/doc/postfix
relay_domains = proxy:mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf lists.developyour.net
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname, reject_rbl_client bl.spamcop.net, reject_rbl_client zen.spamhaus.org
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_tls_CAfile = /etc/ssl/postfix/smtpd.pem
smtpd_tls_cert_file = /etc/ssl/postfix/smtpd.pem
smtpd_tls_key_file = /etc/ssl/postfix/smtpd.pem
smtpd_tls_loglevel = 0
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
soft_bounce = no
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
vacation_destination_recipient_limit = 1
virtual_alias_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:125
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 0
virtual_mailbox_limit_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_mailboxes_maps.cf
virtual_minimum_uid = 125
virtual_transport = virtual
virtual_uid_maps = static:125
```

I appreciate any and all input, suggestions, or assistance.  My phone will not stop ringing.
thank you very much
Murias


----------



## gkontos (Jan 31, 2013)

Make sure that smtp-amavis is running and accepts connections. 

From the host do a:

[CMD=""]# telnet localhost 10024[/CMD]

You should get a reply with the FQDN. If there are problems there you can bypass this by commenting the content filter in your main.cf and master.cf.


----------

