Member Avatar for Pityu

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 -> FROM SERVER:
SMTP -> FROM SERVER: 
SMTP -> ERROR: EHLO not accepted from server: 
SMTP -> 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_use_tls=yes
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 = 192.168.0.0/24 127.0.0.0/8
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

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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.