Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relay access denied in postfix container #1

Open
chaitanya11 opened this issue May 4, 2017 · 2 comments
Open

Relay access denied in postfix container #1

chaitanya11 opened this issue May 4, 2017 · 2 comments

Comments

@chaitanya11
Copy link

This is my postconf -n out put

command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
meta_directory = /etc/postfix
mynetworks_style = class
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix/readme
relayhost = [192.168.99.1]:25
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
shlib_directory = /usr/lib/postfix
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
smtputf8_enable = no
unknown_local_recipient_reject_code = 550

This is my logs

-------------------------------------------------------------------------------
SMTP_SERVER defined as 192.168.99.1
Setting SASL authentication for user [email protected]
Starting Postfix
Postfix started, tailing log
2017-05-04T05:32:34.583826+00:00 mail postfix/postfix-script[59]: warning: not owned by root: /var/spool/postfix/.
2017-05-04T05:32:34.585173+00:00 mail postfix/postfix-script[60]: warning: not owned by root: /var/spool/postfix/pid
2017-05-04T05:32:34.591900+00:00 mail postfix/postfix-script[78]: starting the Postfix mail system
2017-05-04T05:32:34.595668+00:00 mail postfix/master[80]: daemon started -- version 3.0.3, configuration /etc/postfix
2017-05-04T05:32:53.937474+00:00 mail postfix[88]: fatal: usage: postfix [-c config_dir] [-Dv] command
2017-05-04T05:36:45.246633+00:00 mail postfix/smtpd[93]: connect from unknown[192.168.99.1]
2017-05-04T05:36:45.254567+00:00 mail postfix/smtpd[93]: NOQUEUE: reject: RCPT from unknown[192.168.99.1]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<localhost>
2017-05-04T05:36:45.254982+00:00 mail postfix/smtpd[93]: disconnect from unknown[192.168.99.1] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4

This is my docker run command
docker run -e SMTP_SERVER=192.168.99.1 -e [email protected] -e SMTP_PASSWORD=123 --name mail -p 25:25 -p 587:587 --hostname mail.rentmap.com -d mail

Can any one give some solution to it

@olliefreeman
Copy link
Contributor

Hi,

Are you just trying to use this as a simple relay, if so you don't need to provide the smtp details. Providing these details will relay the emails out into the web, providing the smtp details will relay them to an smtp server which will then relay them.

Also change --hostname to an env variable SERVER_HOSTNAME.

And are you running this as an inbound or outbound relay?

@chaitanya11
Copy link
Author

Hi,
I am running this as outbound relay. i Want to use this container as mail delivery service.
Even if i remove environmental variables from docker run command it is giving same error.(Relay access denied).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants