Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i've got the problem that my postfix accept his own relay domains.

Postfix is acting as an Relayhost.

Is it possible to stop this?

Thanks for replies

i tried the following telnet test from a client:

telnet MYSERVER 25
Connected to MYSERVER.
Escape character is '^]'.
220 MYSERVER ESMTP Postfix (Ubuntu)
mail from:test@MYDOMAIN
250 2.1.0 Ok
rcpt to:test@MYDOMAIN
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
250 2.0.0 Ok: queued as 2C97....

myhostname = MYSERVER
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = MYSERVER, localhost.MYDOMAIN, localhost
relayhost =
mynetworks = [::ffff:]/104 [::1]/128
transport_maps = hash:/etc/postfix/transport
relay_domains = hash:/etc/postfix/relay_domains
relay_recipient_maps = hash:/etc/postfix/relay_recipients_map
# Restrictions

smtpd_helo_required = yes

smtpd_recipient_restrictions =
# White- and Blacklist
        check_client_access hash:/etc/postfix/accesslists/access_client,
        check_helo_access hash:/etc/postfix/accesslists/access_helo,
# use clear mails
# own user



share|improve this question
What did you want it to do with email for MYSERVER? – DerfK Nov 29 '12 at 20:40
sorry by telnet test it should MYDOMAIN instead of MYSERVER - if fix it above – Max Nov 29 '12 at 20:44
up vote 1 down vote accepted

i've got the problem that my postfix accept his own relay domains.

Yes, of course. if it didn't, how could it relay mail ?

Postfix is acting as an Relayhost.

Make sure you understand what this means.

Is it possible to stop this?

Of course; remove the domains in question from relay_domains.

Relaying mail is a binary operation: mail is either accepted and relayed, or it is not accepted.
There is no third alternative.

share|improve this answer

This is perfectly normal and is how SMTP works. You didn't relay THROUGH your server, you sent an email TO a user whose domain your server is authoritative for. You essentially "mimicked" an SMTP session to your server to send your user an email. Those commands are the same commands that any SMTP server will issue when connecting to your server to send your user an email.

To clarify: You DID NOT relay THROUGH your server. You sent an email TO your server for YOUR user.

share|improve this answer
Thanks for reply. If i understand you correctly this telnet code will work for each valid domain and adresses in relay_recipient_map and relay_domains? For example everyone who knows more valid adresses can sent messages to all known adresses if i am correct? So there must be a way to prevent this or do i absolutly understand it wrong? – Max Nov 29 '12 at 21:21
I have no idea what relay_recipient_map and relay_domains are. What I do know is that your server will accept email addressed to domains for which it is authoritative for. – joeqwerty Nov 29 '12 at 21:29
They are the means by which postfix allows relaying to external domains. – adaptr Nov 30 '12 at 10:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.