1

i have postfix set up as a satellite to listen on port 587 i can send email outside fine trough the postfix(ubuntu) box from the local network with no problems

when i try to connect to the postfix(ubuntu) box from a external ip and send mail it spits back a 554 5.7.1 Relay access denied error

i can telnet to it fine, just cant send mail

this is my main.cf :

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_use_tls = no

myhostname = cotiso-desktop
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomainname.com, cotiso-desktop, localhost.localdomain, localhost
relayhost = smtp.mydomainname.com
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all 
inet_protocols = all

there is no security set up yet, i'm just trying to get it working first

any ideas?

thanks in advance

thanks pQd i tried with a fixed external ip and it works, but i would like to let more people use it regardless of whether they're connected from, do i have to install something else in order to get it to work?

1
  • Small comment: this is one area where 'get it working first, add security later' is dangerous: you may become an open relay. You will need to add the right commands to log in to your telnet session. Nov 5, 2010 at 11:08

3 Answers 3

1

If your external clients don't have fixed IPs you'll have to autheticate them somehow. Have a look at this: http://www.postfix.org/SASL_README.html

0

is external ip fixed? if so add it in main.cnf as below:

mynetworks=127.0.0.0/8, 80.1.2.3/32
0

To enable particular user related with username (not ip address, if user uses dhcp)

smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/maps/access-allowed-outside-senders, reject_unknown_recipient_domain, reject_non_fqdn_recipient, reject_unauth_pipelining, permit_mynetworks, reject_unauth_destination, reject

/etc/postfix/maps/access-allowed-outside-senders: [email protected] OK

This way, [email protected] is allowed to send mail outside of your domain, even if he is outside of your network.

You must log in to answer this question.