0

Trying to use my server as a relay to send mail to another server gives you relay access denied, this is correct behavior.

MAIL FROM: admin@myserver
SMTP -> FROM SERVER:
250 2.1.0 Ok
RCPT TO: [email protected]
SMTP -> FROM SERVER:
554 5.7.1 : Relay access denied
SMTP -> ERROR: RCPT not accepted from server: 554 5.7.1 : Relay access denied

Trying to use my server as a relay to my server works for some reason.

MAIL FROM: admin@myserver
SMTP -> FROM SERVER:
250 2.1.0 Ok
RCPT TO: admin@myserver
SMTP -> FROM SERVER:
250 2.1.5 Ok
Sending Mail Message Body...
SMTP -> FROM SERVER:
354 End data with .
SMTP -> FROM SERVER:
250 2.0.0 Ok: queued as 1D80D380166

How do I stop this? I already have spammer spamming me with job offers

2 Answers 2

0

You need to create smtp_sender_restrictions. Allow your own network permit_mynetworks and/or authenticated senders permit_sasl_authenticated and then block any mail from your own domain name check_sender_access.

0

Turn on SMTP authorization.

See http://www.postfix.org/SASL_README.html and http://postfix.state-of-mind.de/patrick.koetter/smtpauth/smtp_auth_mailservers.html

2
  • I can't get sasl to work, I tried dovecot sasl and cyrus sasl like it says in the postfix sasl readme but for some reason I can't get it work. Here is my main.cf file pastebin.com/ec7ALtJ7
    – Shoshomiga
    Jul 21, 2011 at 22:47
  • What doesn't work? Are you getting an error or can you still send mail without authorization?
    – Paul
    Jul 21, 2011 at 23:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .