Hello there folks.
I have a problem: I've set up an Ubuntu home developing server, on which I've installed webmin, apache, etc. (everything what's needed for a web hosting server, it is used for developing)

Everything went okay, until I've reached the mail server setup.

There is a misconfiguration problem, cause using the https://www.wormly.com/test_smtp_server service to test my smtp it gives either the relay access error if my configuration looks like this:

smtpd_recipient_restrictions = permit_sasl_authenticated permit_inet_interfaces permit_mynetworks reject_unauth_destination

or gives this

SMTP -> ERROR: EHLO not accepted from server: 
SMTP -> ERROR: HELO not accepted from server: 
Message sending failed.

if y configuration is the one mentioned below.
The current log file line which is given after the test above
Apr 16 16:32:23 www postfix/smtpd[9148]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit

I understand that I have to use one of the above, but that way the relay access problem comes up again.

Could somebody help me out with my problem, and help me set up the stuff to work please?
It's been a few days now and I can't do this anymore :)))

Here is the main.cf of the postfix:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = dev.bestudion.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, $mydomain
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
myorigin = $mydomain
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtp_sasl_password_maps = hash:/etc/postfix/smtp_sasl_password_map
relayhost = smtp.dev.bestudion.net
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = 
mynetworks =
relay_domains = permit_sasl_authenticated permit_inet_interfaces permit_mynetworks permit_mx_backup
ignore_mx_lookup_error = yes
allow_untrusted_routing = yes
smtpd_recipient_restrictions = permit_mynetworks permit_inet_interfaces permit_sasl_authenticated permit_mx_backup
5 Years
Discussion Span
Last Post by PhilEaton

bumping this. postfix/setting up a mail server is an absolute pain in the butt. I'm trying to figure out this as well.


If you're still having an issue with this. I'd suggest using the PHPMailer Class. After a few days of trying to get my SMTP server going, nothing worked. The PHPMailer Class is simple and lets you use any pre-existing SMTP server (like your gmail account) to send mail. It is a easy solution if your really need it. Otherwise, let me know how your config goes!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.