Postfix with SMTP Submission on Port 587

5 posts / 0 new
Last post
#1 Tue, 06/22/2010 - 10:36
Steffan
Steffan's picture

Postfix with SMTP Submission on Port 587

I set up a new box using Virtualmin on CentOS but ran into an issue. I need to turn on the SMTP Submission port on 587. I didn't see an entry in the control panels, maybe I missed it, so I edited the master.cf file by uncommenting the submission line. This worked to turn it on after restarting postfix. The problem is that users get rejected by the username. It will not accept the usual user.domain or even user@domain.tld. Is there a trick I am missing on how to handle that? The smtp auth they are using says to send the same username and password for sending mail.

Suggestions?

Thanks, Steffan

If it matters, here are the additional configs I added to help with spam. Perhaps one of them is giving trouble.

smtpd_delay_reject = yes smtpd_helo_required = yes smtpd_helo_restrictions = permit_mynetworks, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, permit

smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_destination, permit

smtpd_recipient_restrictions = reject_unauth_pipelining, reject_non_fqdn_recipient, reject_unknown_recipient_domain, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit

smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_rbl_client bl.spamcop.net, reject_rbl_client zen.spamhaus.org, reject_rbl_client dnsbl.sorbs.net, permit

Tue, 06/22/2010 - 10:38
andreychek

Howdy,

What are you seeing in the mail logs over in /var/log/maillog? That may offer some details on what's going awry.

You'll want to make sure that saslauthd is running, and that it's using the -r parameter.

Also, you might consider enabling SMTPS in addition to submission, and accessing that on port 465... I'm curious if that happens to work for you.

-Eric

Tue, 06/22/2010 - 11:54 (Reply to #2)
Steffan
Steffan's picture

This appears to be from a block where I know I remoted into his machine in an attempt to see what was up:

Jun 22 06:52:51 hosting1 postfix/smtpd[27344]: warning: 75.60.21.59: hostname adsl-75-60-21-59.dsl.emhril.sbcglobal.net verification failed: Name or service not known Jun 22 06:52:51 hosting1 postfix/smtpd[27344]: connect from unknown[75.60.21.59] Jun 22 06:52:52 hosting1 dovecot: pop3-login: Login: user=<mitchc.xxxxxxx>, method=PLAIN, rip=::ffff:75.60.21.59, lip=::ffff:65.39.69.226 Jun 22 06:52:53 hosting1 dovecot: POP3(mitchc.xxxxxx): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Jun 22 06:52:53 hosting1 postfix/smtpd[27344]: NOQUEUE: reject: RCPT from unknown[75.60.21.59]: 504 5.5.2 <[Email Confidential]>: Recipient address rejected: need fully-qualified address; from=MitchC@xxxxxxx.com to=<[Email Confidential]> proto=ESMTP helo=<[192.168.1.2]> Jun 22 06:52:54 hosting1 postfix/smtpd[27344]: lost connection after RCPT from unknown[75.60.21.59] Jun 22 06:52:54 hosting1 postfix/smtpd[27344]: disconnect from unknown[75.60.21.59] Jun 22 06:53:11 hosting1 postfix/smtpd[26816]: lost connection after DATA from unknown[59.92.4.208] Jun 22 06:53:11 hosting1 postfix/smtpd[26816]: disconnect from unknown[59.92.4.208]

As far as the saslauthd :

ps axwww | grep saslauthd 6432 ? S 0:00 sh -c su root -c ps\ axwww\ |\ grep\ saslauthd 2>&1 6433 ? S 0:00 su root -c ps axwww | grep saslauthd 6434 ? S 0:00 bash -c ps axwww | grep saslauthd 6436 ? S 0:00 grep saslauthd 18568 ? Ss 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam 18569 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam 18570 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam 18571 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam 18572 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam

I have not changed anything with saslauthd as I have not learned about this yet.

So, any other ideas why it's bombing out?

Thanks, Steffan

Tue, 06/22/2010 - 11:14
andreychek

In /etc/sysconfig/saslauthd, there's a "FLAGS=" section... try adding the "-r" param to that, so that it looks like this:

FLAGS=-r

And then restart saslauthd with:

/etc/init.d/saslauthd restart

Let us know if that does the trick!

-Eric

Tue, 06/22/2010 - 11:55 (Reply to #4)
Steffan
Steffan's picture

Here are the results:

ps axwww | grep saslauthd 9019 ? Ss 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -r 9020 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -r 9021 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -r 9022 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -r 9023 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -r 9043 ? S 0:00 sh -c su root -c ps\ axwww\ |\ grep\ saslauthd 2>&1 9044 ? S 0:00 su root -c ps axwww | grep saslauthd 9045 ? S 0:00 bash -c ps axwww | grep saslauthd 9047 ? S 0:00 grep saslauthd

As far as that message, it seems to be caused by the user making a mistake that I did not initially see. I opened up the email on his machine remotely and saw that he was trying to send the email to an invalid email address and that is what the error message was trying to tell him. From the log this was the clue: "RCPT from unknown[75.60.21.59]: 504 5.5.2 <[Email Confidential]>: Recipient...." He clicked on a link to send an email but it put in a corrupt email address. He filled in the remainder of the email and send it on. It was in the log too but I didn't interpret the log correctly. Anyway, I sent a test message from his computer to mine and it seemed to go through. So, it seems to be resolved and working now.

I appreciate your help and quick response.

Now, to gather my info for another post about graylisting and spf record services. I spent HOURS reading but got no where. Hopefully you'll have the answer to those as well. :-)

Topic locked