×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

postfix issue or SMTP Client?

postfix issue or SMTP Client?

postfix issue or SMTP Client?

(OP)
Hi,

I have a problem when using the check_recipient_access parameter to restrict specified recipients on postfix. Mailflow behaves as expected generally, but the issue arises when a specific application sends mails to postfix to both an "allowed recipient" and a "disallowed recipient" in the same SMTP transaction. I can replicate similar behaviour if testing with the MS SmtpDiag Tool or smtpProber as I see a "quit" command , no data and no message sent to either the allowed recipient or the disallowed recipient. I also see similar if using an smtp relay except it reports RSET rather than quit. However, if i repeat the test with sendSMTP, Telnet or socketlabs SMPT Console then the message gets processed correctly, i.e. mail is sent to the allowed user and is not sent to the disallowed user. It would appear to be a client issue, but can not seem to work around it - anyone have any ideas or any postfix config that can be changed?

example output:

"problem" tests:
Connecting to mail server.
Connected.
220 mydomain.local ESMTP Postfix (Ubuntu)
EHLO TESTSERVER
250-mydomain.local
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
RSET
250 2.0.0 Ok
MAIL FROM: <admin@mydomain.com>
250 2.1.0 Ok
RCPT TO: <user@allowedrecipient.com>
250 2.1.5 Ok
RCPT TO: <user@disallowedrecipient.com>
554 5.7.1 <user@disallowedrecipient.com>: Recipient address rejected: Access denied
Error: SMTP protocol error. 554 5.7.1 <user@disallowedrecipient.com>: Recipient address rejected: Access denied.
Failed to send messageForcing disconnection from SMTP server.
QUIT
221 2.0.0 Bye
Disconnected.

Out: 220 mydomain.local ESMTP Postfix (Ubuntu)
In: EHLO TESTSERVER
Out: 250-mydomain.local
Out: 250-PIPELINING
Out: 250-SIZE 10240000
Out: 250-VRFY
Out: 250-ETRN
Out: 250-STARTTLS
Out: 250-ENHANCEDSTATUSCODES
Out: 250-8BITMIME
Out: 250 DSN
In: RSET
Out: 250 2.0.0 Ok
In: MAIL FROM:<admin@mydomain.com>
Out: 250 2.1.0 Ok
In: RCPT TO:<user@allowedrecipient.com>
Out: 250 2.1.5 Ok
In: RCPT TO:<user@disallowedrecipient.com>
Out: 554 5.7.1 <user@disallowedrecipient.com>: Recipient address rejected: Access denied
In: QUIT
Out: 221 2.0.0 Bye

successful test:
Stat Connected.
Recv 04/06/2018 21:48:46: 220 mydomain.local ESMTP Postfix (Ubuntu)<EOL>
Sent 04/06/2018 21:48:46: EHLO SendSMTPv2.19.0.1<EOL>
Recv 04/06/2018 21:48:46: 250-mydomain.local<EOL>250-PIPELINING<EOL>250-SIZE 10240000<EOL>250-VRFY<EOL>250-ETRN<EOL>250-STARTTLS<EOL>250-ENHANCEDSTATUSCODES<EOL>250-8BITMIME<EOL>250 DSN<EOL>
Sent 04/06/2018 21:48:46: STARTTLS<EOL>
Recv 04/06/2018 21:48:46: 220 2.0.0 Ready to start TLS<EOL>
Sent 04/06/2018 21:48:46: EHLO SendSMTPv2.19.0.1<EOL>
Recv 04/06/2018 21:48:46: 250-mydomain.local<EOL>250-PIPELINING<EOL>250-SIZE 10240000<EOL>250-VRFY<EOL>250-ETRN<EOL>250-ENHANCEDSTATUSCODES<EOL>250-8BITMIME<EOL>250 DSN<EOL>
Sent 04/06/2018 21:48:46: MAIL FROM:<admin@mydomain.com><EOL>
Recv 04/06/2018 21:48:46: 250 2.1.0 Ok<EOL>
Sent 04/06/2018 21:48:46: RCPT TO:<user@allowedrecipient.com><EOL>
Recv 04/06/2018 21:48:46: 250 2.1.5 Ok<EOL>
Sent 04/06/2018 21:48:46: RCPT TO:<user@disallowedrecipient.com><EOL>
Recv 04/06/2018 21:48:46: 554 5.7.1 <user@disallowedrecipient.com>: Recipient address rejected: Access denied<EOL>
Sent 04/06/2018 21:48:46: DATA<EOL>
Recv 04/06/2018 21:48:46: 354 End data with <CR><LF>.<CR><LF><EOL>
Sent 04/06/2018 21:48:46: From: "admin@mydomain.local" <admin@mydomain.local><EOL>Subject: this is an smtpsend test<EOL>To: user@allowedrecipient.com, user@disallowedrecipient.com<EOL>Content-Type: multipart/mixed; charset=utf-8<EOL>MIME-Version: 1.0<EOL>Content-Transfer-Encoding: 8bit<EOL>Date: Mon, 4 Jun 2018 21:48:46 +0100<EOL>X-Mailer: SendSMTP Version 2.19 Release 0 Build 1<EOL>
Sent 04/06/2018 21:48:46: <EOL>
Sent 04/06/2018 21:48:46: <EOL>
Sent 04/06/2018 21:48:46: .<EOL>
Recv 04/06/2018 21:48:46: 250 2.0.0 Ok: queued as 69365E144D<EOL>
Sent 04/06/2018 21:48:46: QUIT<EOL>
Recv 04/06/2018 21:48:46: 221 2.0.0 Bye<EOL>
Stat Disconnected.

RE: postfix issue or SMTP Client?

Because you can send messages correctly with one client but not with a different client suggests it is a client issue NOT a Postfix issue. Possibly in the way the client application handles return messages and status codes.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close