Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

This is my /etc/hosts file

127.0.0.1       localhost.localdomain                   localhost
127.0.1.1       ubuntu-server.xx.com                ubuntu-server
193.77.xx.xx   mail.xx.com                         mail

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

is this correct configuration for my mail server. I am behind router so i don't know if is ok to use my IP for mail.xx.com and 127.0.0.1 for localhost

problem is that i can receive mail but when i send it i get

Oct 17 21:29:32 ubuntu-server postfix/smtpd[2453]: warning: SASL authentication failure: Password verification failed
Oct 17 21:29:32 ubuntu-server postfix/smtpd[2453]: warning: my.router[192.168.1.1]: SASL PLAIN authentication failed: authentication failure
Oct 17 21:29:34 ubuntu-server postfix/smtpd[2453]: warning: my.router[192.168.1.1]: SASL LOGIN authentication failed: authentication failure

EDIT:

mabye is problem some port. i foward this ports.

POP3 - port 110
IMAP - port 143
SMTP - port 25
HTTP - port 80
Secure SMTP (SSMTP) - port 465
Secure IMAP (IMAP4-SSL) - port 585
StartTLS - port 587 
IMAP4 over SSL (IMAPS) - port 993
Secure POP3 (SSL-POP) - port 995

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
delay_warning_time = 4h
disable_vrfy_command = yes
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
maximal_backoff_time = 8000s
maximal_queue_lifetime = 7d
message_size_limit = 0
minimal_backoff_time = 1000s
mydestination =
myhostname = mail.xx.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = no
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
smtp_helo_timeout = 60s
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client dnsbl.njabl.org
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_delay_reject = yes
smtpd_hard_error_limit = 12
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit
smtpd_recipient_limit = 16
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
smtpd_soft_error_limit = 3
smtpd_tls_cert_file = /etc/ssl/private/mail.xx.com.crt
smtpd_tls_key_file = /etc/ssl/private/mail.xx.com.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450
virtual_alias_maps = mysql:/etc/postfix/maps/alias.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_domains = mysql:/etc/postfix/maps/domain.cf
virtual_mailbox_limit = 0
virtual_mailbox_maps = mysql:/etc/postfix/maps/user.cf
virtual_uid_maps = static:5000

saslfinger -c

version: 1.0.4ostfix Cyrus sasl configuration Ä
mode: client-side SMTP AUTH

-- basics --
Postfix: 2.9.3
System: Ubuntu 12.04.1 LTS \n \l

-- smtp is linked to --
        libsasl2.so.2 => /usr/lib/i386-linux-gnu/libsasl2.so.2 (0x00d3a000)

-- active SMTP AUTH and TLS parameters for smtp --
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes


-- listing of /usr/lib/sasl2 --
total 28
drwxr-xr-x  2 root  root   4096 okt 14 15:18 .
drwxr-xr-x 72 root  root  12288 okt 14 15:03 ..
-rw-r--r--  1 root  root      1 maj  4 06:17 berkeley_db.txt
-rw-r-----  1 root  root    701 okt 14 15:18 saslpasswd.conf
-rw-r-----  1 smmta smmsp   885 okt 14 15:18 Sendmail.conf

-- listing of /etc/postfix/sasl --
total 12
drwxr-xr-x 2 root root 4096 okt 11 18:55 .
drwxr-xr-x 4 root root 4096 okt 12 06:59 ..
-rwx------ 1 root root  241 okt 11 18:55 smtpd.conf


Cannot find the smtp_sasl_password_maps parameter in main.cf.
Client-side SMTP AUTH cannot work without this parameter!
share|improve this question
    
Update your question with the output of postconf -n and saslfinger. – Ansgar Wiechers Oct 17 '12 at 21:16
    
i updated my question. thx – mbrc Oct 18 '12 at 4:46

The output of saslfinger is rather self-explanatory:

Cannot find the smtp_sasl_password_maps parameter in main.cf.
Client-side SMTP AUTH cannot work without this parameter!

Create a file (e.g. /etc/postfix/sasl_passwd, make sure only root has access to that file!) and enter the hostname of the relayhost as well as your credentials:

mailrelay.example.com    username:password

Use postmap to create a map from the textfile:

postmap hash:/etc/postfix/sasl_passwd

Then point $smpt_sasl_password_maps to it (in main.cf):

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

Reload Postfix.

For a more detailed explanation see this HOWTO written by Patrick Koetter.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .