View Full Version : Premature end of input - smtpd error
herbie
18th October 2006, 03:26
Doing the Sarge setup and I have this in my mail.log
Oct 18 00:05:54 picard postfix/smtpd[5404]: warning: problem talking to service rewrite: Success
Oct 18 00:05:54 picard postfix/smtpd[5405]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Oct 18 00:05:54 picard postfix/smtpd[5405]: warning: problem talking to service rewrite: Connection reset by peer
Oct 18 00:05:54 picard postfix/master[1614]: warning: process /usr/lib/postfix/trivial-rewrite pid 6341 exit status 1
Oct 18 00:05:54 picard postfix/smtpd[5648]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Oct 18 00:05:54 picard postfix/smtpd[5648]: warning: problem talking to service rewrite: Success
Oct 18 00:05:54 picard postfix/smtpd[6193]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Oct 18 00:05:54 picard postfix/smtpd[6193]: warning: problem talking to service rewrite: Connection reset by peer
Oct 18 00:05:54 picard postfix/master[1614]: warning: process /usr/lib/postfix/trivial-rewrite pid 6342 exit status 1
Oct 18 00:05:54 picard postfix/smtpd[6210]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Oct 18 00:05:54 picard postfix/smtpd[6210]: warning: problem talking to service rewrite: Success
Oct 18 00:05:54 picard postfix/cleanup[6233]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Oct 18 00:05:54 picard postfix/cleanup[6233]: warning: problem talking to service rewrite: Connection reset by peer
I'm guessing here: /etc/postfix/ contains smtpd.key and smtpd.crt is this a certificate error?
herbie
18th October 2006, 22:09
here's another log clue:
Oct 18 19:03:47 picard postfix/master[1614]: warning: process /usr/lib/postfix/trivial-rewrite pid 26318 exit status 1
Oct 18 19:03:47 picard postfix/smtpd[26212]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Oct 18 19:03:47 picard postfix/smtpd[26212]: warning: problem talking to service rewrite: Success
Oct 18 19:03:47 picard postfix/smtpd[26211]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Oct 18 19:03:47 picard postfix/smtpd[26211]: warning: problem talking to service rewrite: Connection reset by peer
Oct 18 19:03:56 picard postfix/smtpd[9929]: fatal: watchdog timeout
Oct 18 19:03:57 picard postfix/master[1614]: warning: process /usr/lib/postfix/smtpd pid 9929 exit status 1
Oct 18 19:03:58 picard postfix/smtpd[26319]: connect from cpe-075-177-007-159.triad.res.rr.com[75.177.7.159]
Oct 18 19:03:58 picard postfix/smtpd[26319]: lost connection after CONNECT from cpe-075-177-007-159.triad.res.rr.com[75.177.7.159]
Oct 18 19:03:58 picard postfix/smtpd[26319]: disconnect from cpe-075-177-007-159.triad.res.rr.com[75.177.7.159]
can anyone be of help?
falko
19th October 2006, 15:02
Which tutorial (URL) are you referring to?
What's in /etc/postfix/main.cf (please strip out the comments)?
herbie
20th October 2006, 02:43
here's /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
myhostname = picard.maxit.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = picard.maxit.net, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
home_mailbox = Maildir/
mailbox_command =
#mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, re$smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mys$virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_lim$virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota$virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $vir$content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
falko
21st October 2006, 21:52
So you're referring to this tutorial? http://www.howtoforge.com/virtual_postfix_mysql_quota_courier
Your main.cf looks pretty wrong. There are some lines that don't make sense, e.g.
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, re$smtpd_tls_auth_only = no
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mys$virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_lim$virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota$virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $vir$content_filter = amavis:[127.0.0.1]:10024
Please run the postconf commands from http://www.howtoforge.com/virtual_postfix_mysql_quota_courier_p2 again.
herbie
2nd November 2006, 00:19
Sorry a massive dump of snow and five day power outage made the secondary mailserver setup low priority...
Cut&paste from nano mucked up some of the lines I posted. I went through all this comparing everything to an identical machine we do have working. Everything I previously had trouble with appears to be fine, but I am still not up and running.
1) I setup 1 domain and 1 user to test the machine. Using squirrelmail, I get an incorrect login error. That is confirmed by the mail.log entry, so I appear to have a problem with authentication. I'm a relative newbie, so how do I tell if the problem is with sasl or with mysql?
2) I also noted that when you create the domain & user in phpmyadmin, it doesn't setup an entry in /home/vmail/domainname or home/vmail/domainname/username. On the other machine, if you create a new user with phpmyadmin and send them an e-mail from another user on the system, it creates their mailbox entry. How do I get started for the first user & domain?
falko
2nd November 2006, 16:27
1) I setup 1 domain and 1 user to test the machine. Using squirrelmail, I get an incorrect login error. That is confirmed by the mail.log entry, so I appear to have a problem with authentication. I'm a relative newbie, so how do I tell if the problem is with sasl or with mysql?Please post the error messages here.
How do I get started for the first user & domain?
The directories are created when the first mail for that user arrives.
herbie
2nd November 2006, 21:56
Here is the mail.log
Nov 2 11:51:27 picard courierpop3login: Connection, ip=[::ffff:204.244.94.250]
Nov 2 11:51:32 picard courierpop3login: LOGIN FAILED, ip=[::ffff:204.244.94.250]
Nov 2 11:51:39 picard courierpop3login: LOGIN FAILED, ip=[::ffff:204.244.94.250]
Nov 2 11:51:40 picard courierpop3login: LOGOUT, ip=[::ffff:204.244.94.250]
Here is the auth.log, it didn't even record an event, but I don't know if it's supposed to....
Nov 2 11:11:44 picard postfix/smtpd[12036]: sql auxprop plugin using mysql engine
Nov 2 11:15:10 picard postfix/smtpd[12039]: sql auxprop plugin using mysql engine
Nov 2 11:17:01 picard CRON[12040]: (pam_unix) session opened for user root by (uid=0)
Nov 2 11:17:01 picard CRON[12040]: (pam_unix) session closed for user root
Nov 2 11:23:54 picard postfix/smtpd[12042]: sql auxprop plugin using mysql engine
Nov 2 11:32:51 picard postfix/smtpd[12052]: sql auxprop plugin using mysql engine
Nov 2 11:35:51 picard postfix/smtpd[12054]: sql auxprop plugin using mysql engine
Nov 2 11:39:01 picard CRON[12057]: (pam_unix) session opened for user root by (uid=0)
Nov 2 11:39:01 picard CRON[12057]: (pam_unix) session closed for user root
Nov 2 11:45:04 picard postfix/smtpd[12075]: sql auxprop plugin using mysql engine
Here is mail.err
Nov 2 11:51:32 picard courierpop3login: LOGIN FAILED, ip=[::ffff:204.244.94.250]
Nov 2 11:51:39 picard courierpop3login: LOGIN FAILED, ip=[::ffff:204.244.94.250]
falko
3rd November 2006, 16:57
Nothing unusual here. Are you sure the username (must be an email address) and password are correct? Also compare your configuration files with those from this tutorial: http://www.howtoforge.com/virtual_postfix_mysql_quota_courier
herbie
3rd November 2006, 20:01
Everything appears to be correct, if you send an email to a user built in phpymyadmin, domain, user and Maildir are created. You can read the mail in the Maildir/new folder.
The only problem is that the users can't login.
Here is a login from a working server:
Nov 3 09:58:25 q courierpop3login: LOGIN, user=rosandav@deleted.com, ip=[::ffff:204.244.94.209]
Here is an attempt from the box I'm setting up:
Nov 3 09:50:27 picard courierpop3login: LOGIN FAILED, ip=[::ffff:204.244.94.250]
No username was recorded. Does this help?
falko
4th November 2006, 18:00
Please double-check the format of /etc/courier/authmysqlrc (whitespace, tabs, etc.). Courier is very finicky about this. It should look like the one in the tutorial.
herbie
7th November 2006, 05:10
Thank you. The "Cut & Pasting Fool (me)" clipped the end off a line in there. Working fine now!
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.