LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   HELP! POSTFIX Relay access denied (http://www.linuxquestions.org/questions/linux-software-2/help-postfix-relay-access-denied-465996/)

cozyk1515 07-20-2006 03:19 PM

HELP! POSTFIX Relay access denied
 
I am very new to POSTFIX- I work for an ISP - I have customer who needs us to catch email for him when his server goes off line a few min every hour. However, I always get a 550 Error on DNS Reports when I try and check with test@Xdomain.com - The MX records are correct it does notice the other entry which is mail.mydomain.com

I have read everything about RELAYING for the domain however - some places have me going creating relay_domains, some add under access - some have me adding info to my main.cf

I am so confused at this point. All of the correct information is in mynetworks **this is the one thing I do know.

I think I am looking for stepby step instructions that I can actually understand- If you need more info please let me know

DNS RECORDS
mail.Xdomain.com.
mail.mydomain.com.

mail IN A XDOMAIN-IPADDRESS

Sorry I don't really have a clue.

Thanks
Gabrielle

Berhanie 07-20-2006 06:06 PM

If I understand your question, you want to act as a backup MX for xdomain.com.

The DNS records for xdomain.com should contain at least two MX records similar to this:
Code:

xdomain.com.  8172    IN      MX      5 smtp.xdomain.com.
xdomain.com.  8172    IN      MX      10 smtp.isp.com.

Notice that the higher-numbered record points to the backup server. This will cause any mail destined for xdomain.com to go to smtp.isp.com in the event that smtp.xdomain.com is down.

There's not much that needs to be done on the ISP's postfix server to act as a backup for xdomain.com.

In main.cf:
Code:

relay_domains = xdomain.com
relay_recipient_maps = hash:/etc/postfix/relay_recipients

The first line makes tells postfix to accept mail for xdomain.com, but to hold on to it. Postfix will do an MX lookup on xdomain.com and deliver the mail to smtp.xdomain.com when it becomes available.

The second line defines all the valid recipients for xdomain.com (which avoids accepting mail for nonexist usernames, i.e. avoids spam).

/etc/postfix/relay_recipients might look something like this:
Code:

postmaster@xdomain.com        dummy
webmaster@xdomain.com          dummy
abuse@xdomain.com              dummy
user1@xdomain.com              dummy
user2@xdomain.com              dummy

Hash tables require a value, so we put "dummy". In this case, the value is not used.

Finally, we build the .db file and reload postfix:
Code:

postmap hash:/etc/postfix/relay_recipients
postfix reload


cozyk1515 07-21-2006 07:15 AM

just a few more questions
 
I was wondering if I could

Main.cf
relay_domains = /etc/postfix/relaydomains
Just wondering because if I have several domains that I am relaying for.

Also do I need to know all of the email address' for xdomain.com in the relay_recipients?

Thanks
Gabrielle

cozyk1515 07-21-2006 08:56 AM

Thanks So Much
 
Thanks I got it fixed the way I posted above worked! Thank you so much!!!
Gabrielle


All times are GMT -5. The time now is 12:20 PM.