Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to install postfix on my webserver couse I need to use sendmail for my website. I only need to send mail not recieve or relay.

send with starttls (port 587) via relay smtp.strato.de

here is what happens

Jul 15 00:02:38 negrita postfix/smtp[7120]: Host offered STARTTLS: [smtp.strato.de]
Jul 15 00:02:38 negrita postfix/smtp[7120]: C717A181252: to=<mt@example.com>, relay=smtp.strato.de[81.169.145.133]:587, delay=0.31, delays=0.09/0/0.16/0.04, dsn=5.7.0, status=bounced (host smtp.strato.de[81.169.145.133] said: 530 5.7.0 Bitte konfigurieren Sie ihr E-Mailprogramm fuer Authentifizierung am SMTP Server, wie auf www.strato.de/email-hilfe beschrieben. - Please configure your mail client for using SMTP Server Authentication (in reply to MAIL FROM command))
Jul 15 00:02:38 negrita postfix/cleanup[7118]: 29F5F181254: message-id=<20120714220238.29F5F181254@negrita>
Jul 15 00:02:38 negrita postfix/qmgr[7102]: 29F5F181254: from=<>, size=2548, nrcpt=1 (queue active)
Jul 15 00:02:38 negrita postfix/bounce[7121]: C717A181252: sender non-delivery notification: 29F5F181254
Jul 15 00:02:38 negrita postfix/qmgr[7102]: C717A181252: removed
Jul 15 00:02:39 negrita postfix/local[7122]: 29F5F181254: to=<michael@negrita>, relay=local, delay=1.1, delays=0.04/0/0/1.1, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Jul 15 00:02:39 negrita postfix/qmgr[7102]: 29F5F181254: removed
Jul 15 08:05:18 negrita postfix/master[1083]: daemon started -- version 2.9.1, configuration /etc/postfix
Jul 15 08:05:29 negrita postfix/master[1083]: reload -- version 2.9.1, configuration /etc/postfix

and my config

michael@negrita:~$ postconf -n
biff = no
config_directory = /etc/postfix
delay_warning_time = 4h
home_mailbox = /home/michael/Maildir/
html_directory = /usr/share/doc/postfix/html
inet_interfaces = localhost
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydomain = example.com
myhostname = negrita
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
notify_classes = resource, software, protocol
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost = [smtp.strato.de]:587
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
smtp_tls_enforce_peername = no
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
soft_bounce = yes

the user and password is ok couse I can send mail with my thunderbird

thanks in advance mike

share|improve this question

Your error is about authentication, not startTLS.

Why would you need to relay your mails through smtp.strato.de? Configuring authentication for mail relay is difficult (well, not so much with a good doc) and you probably don't need it. Just remove the following line (or similar) from your main.cf:

relayhost = [smtp.strato.de]:587

Restart postfix and it should work

share|improve this answer

To properly send and receive email for your domain you will need to have a DNS MX Record. This record verifies a domains email server.

Without that record, sending email won't work most of the time, because most servers check the MX record from incoming servers and refuse to accept email without a valid record (they check the ip address of the incoming server with the DNS entry).

Of course your domain needs to be properly setup in your postfix config too and you should make sure only to accept email for your domain (otherwise you might be an open relay server).

These two facts are utterly important, so that your email server will be accepted by other email servers and is allowed to send your email.

Also if you are an open relay and spam ge's send over your server, you might get blacklisted quickly and then your server is dead, no matter what. To get it off the list again will be a hard thing to do. So do be careful.

Oh and BTW.... You were trying to use strato as a relay server, which won't work. You can only send emails as(with) a strato user (account) with a valid password.

And still if you have an account with strato and a valid password, emails would be send with/from your strato account, not your own domain account.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.