Hello all, i've tryied to setup a mail server using thise guide:
http://www.debianadmin.com/debian-mail-server-setup-with-postfix-dovecot-sasl-squirrel-mail.html
I can easily recieve it, but have problems sending it.
My main.cf :

biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
myhostname = server
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server, localhost.localdomain, localhost, jen140.hopto.org
relayhost =
mynetworks= 192.168.0.1 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = server
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous
virtual_maps = hash:/etc/postfix/virtusertable
local_recipient_maps =

When i try to send using TLS autentication with hostname "jen140.hopto.org" i get

14-10-2009, 22:16:04: SEND  - Initiating TLS handshake
>14-10-2009, 22:16:04: SEND  - Certificate S/N: E7A8ECAF42FCA158, algorithm: RSA (1024 bits), issued from 30/09/2009 13:03:51 to 28/09/2019 13:03:51, for 1 host(s): server.
>14-10-2009, 22:16:04: SEND  - Owner: server.
>14-10-2009, 22:16:04: SEND  - This certificate is self-issued.
!14-10-2009, 22:16:04: SEND  - TLS handshake failure. The server host name ("jen140.hopto.org") does not match the certificate.

As i understand i need to create a new certificate for that hostname, but i didnt find any way to do it, sometimes because i lack files or just dont know what to put.
I've also tryied setting "server" as the hostname of the smtp server and got the next errors:

14-10-2009, 22:17:44: SEND  - TLS handshake complete
 14-10-2009, 22:17:44: SEND  - Conectando ao servidor SMTP
 14-10-2009, 22:17:44: SEND  - authenticating (software CRAM-MD5)...
 14-10-2009, 22:17:44: SEND  - O servidor indicou erros. A resposta é: 5.7.8 Error: authentication failed: authentication failure
 14-10-2009, 22:17:44: SEND  - O servidor indicou erros. A resposta é: 5.7.8 Error: authentication failed: authentication failure
 14-10-2009, 22:17:44: SEND  - authenticating (plain)...
 14-10-2009, 22:17:44: SEND  - O servidor indicou erros. A resposta é: 5.7.8 Error: authentication failed: authentication failure
 14-10-2009, 22:17:44: SEND  - authenticating (login)...
 14-10-2009, 22:17:44: SEND  - O servidor indicou erros. A resposta é: 5.7.8 Error: authentication failed: authentication failure
 14-10-2009, 22:17:44: SEND  - VAROVÁNÍ: nebyl nalezen žádný kompatibilní protokol pro ovìøení
 14-10-2009, 22:17:44: SEND  - Enviando mensagem para scan@virustotal.com
 14-10-2009, 22:17:44: SEND  - The last address submitted was <scan@virustotal.com>
!14-10-2009, 22:17:44: SEND  - A mensagem não foi enviada. O servidor respondeu - 5.7.1 <scan@virustotal.com>: Relay access denied

Any way to solve thise?

It looks like your system is thinking the mail is destined localhost and is trying to re-direct the mail to a local user on the system, is it only that domain that has issues, or if you try to send anywhere does it do the same?

Does your /etc/postfix/virtusertable look like it should?

I apologize for my previous response, I apparently missed a critical part of your first post. It looks like the certificate is the default self signed certificate, which doesn't match the hostname. One of the things you can do is locate the mkcert script in /usr/share/doc/postfix*/examples/ and see if you can generate a new self-signed certificate for your hostname.

Thanks for the response, but as no 1 responded i installed the Kerio Mail server (trial version is enought for now).

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.