Submitted by admin@curatebee.com on Tue, 09/02/2014 - 22:16
I am getting this error when trying to send email "Failed to send mail : SMTP command mail from: hello@tinywings.org.au failed : 530 5.7.0 Must issue a STARTTLS command first"
Also doesn't seem to be receiving email on this domain?
Status:
Closed (fixed)
Comments
Submitted by andreychek on Tue, 09/02/2014 - 22:35 Comment #1
Howdy -- how are you attempting to send email? Is that with a desktop-based email client, or on the server itself?
If using a desktop-based client, what port are you attempting to connect to?
Submitted by admin@curatebee.com on Tue, 09/02/2014 - 22:46 Comment #2
Trying to send mail logged into usermin on the server.
Submitted by andreychek on Tue, 09/02/2014 - 23:24 Comment #3
If you log into Virtualmin, and then go into Webmin -> Webmin -> Usermin Configuration -> Usermin Module Configuration -> Read Mail, what are the following fields set to:
Send mail via connection to
SMTP authentication method
Port number for SMTP
Sendmail command
Submitted by admin@curatebee.com on Tue, 09/02/2014 - 23:34 Comment #4
Send mail via connection to localhost SMTP authentication method Default Port number for SMTP Default (25) Sendmail command /usr/lib/sendmail
Submitted by andreychek on Tue, 09/02/2014 - 23:41 Comment #5
Hmm, that's a pretty unusual problem! Your Usermin configuration appears correct.
Is this a fairly new Ubuntu installation? Do you know if the Postfix configuration has been tweaked at all?
What is the output of the command "postconf -n"?
And can you attach the /etc/postfix/master.cf file? You may need to rename that file to end in .txt in order to be able to attach it.
Submitted by admin@curatebee.com on Tue, 09/02/2014 - 23:58 Comment #6
It is fairly new but I know we tested it after moving the site to it so not sure why it's not working now.
> postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = ns1, localhost.hernet.com.au, localhost, $mydomain, $myhostname
myhostname = ns1.hernet.com.au
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
non_smtpd_milters = local:/var/run/milter-greylist/milter-greylist.sock
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_milters = local:/var/run/milter-greylist/milter-greylist.sock
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous noplaintext
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level = encrypt
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual
Submitted by andreychek on Wed, 09/03/2014 - 12:17 Comment #7
Your Postfix settings appear to be correct as well.
I'm trying to sort out whether we're seeing a Usermin issue, or a Postfix issue... to troubleshoot that, is there any chance that you could use the Install Scripts to install RoundCube, and then attempt to send an email using that?
I'd be curious to see if that goes through properly.
Submitted by admin@curatebee.com on Wed, 09/03/2014 - 17:37 Comment #8
I installed roundcube and tried to send an email and got the error.
SMTP Error (250): Authentication failed.
Submitted by andreychek on Wed, 09/03/2014 - 18:50 Comment #9
Okay, that helps. It appears that the issue is with Postfix.
There may be something non-default in there that's causing some trouble.
I've been researching the options listed in there -- this one in particular caught my attention:
smtpd_sasl_security_options = noanonymous noplaintext
Could you try commenting that line out, and then restart Postfix with this command:
/etc/init.d/webmin restart
Once you do that, could you try sending an email using Usermin or RoundCube again?
If that doesn't work -- the next step is to try commenting out the "smtpd_milters" and "non_smtpd_milters" lines, as it's possible something with the Milter being used is causing the problem you're seeing.
Submitted by admin@curatebee.com on Wed, 09/03/2014 - 19:29 Comment #10
Have made the changes but still get the same error.
postconf -n now
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases allow_percent_hack = no append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes config_directory = /etc/postfix home_mailbox = Maildir/ mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailbox_size_limit = 0 milter_default_action = accept milter_protocol = 2 mydestination = ns1, localhost.hernet.com.au, localhost, $mydomain, $myhostname myhostname = ns1.hernet.com.au mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = $mydomain readme_directory = no recipient_delimiter = + sender_bcc_maps = hash:/etc/postfix/bcc smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_security_level = encrypt smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_alias_maps = hash:/etc/postfix/virtual
Submitted by admin@curatebee.com on Wed, 09/03/2014 - 20:30 Comment #11
Okay, found part of the problem, changed the below to "may" instead of "encrypt" as it was trying to encrypt all email.
smtpd_tls_security_level = encrypt
Also left this commented out.
smtpd_sasl_security_options = noanonymous noplaintext
Now I can send emails, just need to test receiving them.
Submitted by andreychek on Wed, 09/03/2014 - 20:37 Comment #12
Super, I'm glad you got that figured out!
What issue are you having when receiving emails?
You should see log messages in /var/log/mail.log for each incoming email, those logs may help in diagnosing what's going on.
If you don't see anything in /var/log/mail.log, that suggests that the email isn't hitting your server.
Submitted by admin@curatebee.com on Thu, 09/04/2014 - 00:23 Comment #13
All good now, I think it was just the encrypt being on that was affecting mail being sent and received. Thanks for your help.
Submitted by andreychek on Thu, 09/04/2014 - 09:55 Comment #14
We're glad to hear it's all working for you now!
I'll go ahead and mark this as fixed. Feel free to let us know if you have any other questions.
Submitted by Issues on Thu, 09/18/2014 - 09:57 Comment #15
Automatically closed -- issue fixed for 2 weeks with no activity.