Apparently I had to install libsasl2-module. Now smtp seems to work fine, but now I have this problem:

When i send an email to any domain outside the server (like something@yahoo.com) , postfix says: "Relay access denied"

my /etc/postfix/main.cf looks like this:

# 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 (Debian/GNU)
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

virtual_alias_maps = hash:/etc/postfix/virtual
readme_directory = no

# TLS parameters
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

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = MYDOMAIN
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes

myhostname = debian
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =  localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all


Any ideas??







2011/10/30 Jamie Cameron <jcameron@webmin.com>
Sounds like an error in your postfix configuration - did you make any changes
to /etc/postfix/main.cf or in Webmin's Postfix module?

On 30/Oct/2011 08:01 Matías Montenegro <matiasmmontenegro@gmail.com> wrote ..
> ok, I think I solved IMAP and POP3 problems (but not IMAPs, and POP3s).
> Anyway, I'm pretty satisfied with this by the moment.
> I've been using a client called "mutt" to test the imap service, and it
> worked perfectly, so probably there is something wrong with my thunderbird.
>
> Well, now my problem is the smtp protocol, and I'm testing it with telnet
> from my server.
> debian:~# telnet localhost smtp
> Trying 127.0.0.1...
> Connected to debian.local.
> Escape character is '^]'.
> (It doesn't say anything about postfix)
>
> In the meanwhile (/var/log/mail.log):
> Oct 31 03:01:28 debian dovecot: imap-login: Disconnected: rip=127.0.0.1,
> lip=127.0.0.1, secured
> Oct 31 03:01:30 debian dovecot: pop3-login: Disconnected: rip=127.0.0.1,
> lip=127.0.0.1, secured
> Oct 31 03:01:51 debian postfix/smtpd[19803]: warning:
> xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
> Oct 31 03:01:51 debian postfix/smtpd[19803]: fatal: no SASL authentication
> mechanisms
> Oct 31 03:01:51 debian postfix/smtpd[19807]: warning:
> xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
> Oct 31 03:01:51 debian postfix/smtpd[19807]: fatal: no SASL authentication
> mechanisms
> Oct 31 03:01:52 debian postfix/master[18972]: warning: process
> /usr/lib/postfix/smtpd pid 19803 exit status 1
> Oct 31 03:01:52 debian postfix/master[18972]: warning:
> /usr/lib/postfix/smtpd: bad command startup -- throttling
> Oct 31 03:01:52 debian postfix/master[18972]: warning: process
> /usr/lib/postfix/smtpd pid 19807 exit status 1
>
>
> Then, I check if postfix is running at port 25
> debian:~# lsof -i tcp:25
> COMMAND   PID USER   FD   TYPE DEVICE SIZE NODE NAME
> master  18972 root   12u  IPv4 659526       TCP *:smtp (LISTEN)
> (every looks fine here)
>
> The port is opened, I just checked it.
>
> What might be wrong here?
>
> I'm thanking you for any ideas
>
>
>
> 2011/10/29 Jamie Cameron <jcameron@webmin.com>
>
> > The IMAP protocol doesn't work like that.
> >
> > The correct command would be something like :
> >
> > 01 login "username" "password"
> >
> > You should test using an actual IMAP client, like outlook or thunderbird
> > ..
> >
> > On 28/Oct/2011 19:29 Matías Montenegro <matiasmmontenegro@gmail.com>
> > wrote ..
> >
> > Hi Jamie,
> >
> > I tested with port 143 and this is what i get:
> >
> > telnet mydomain
> > 143
> > ~
> > Trying xx.xx.xx.xx...
> > Connected to mydomain.
> > Escape character is '^]'.
> > * OK Dovecot ready.
> > user test.mydomain
> > user BAD Error in IMAP command received by server.
> >
> > And in my /var/log/mail.log:
> > Oct 29 02:32:28 debian dovecot: imap-login: Disconnected: rip=127.0.0.1,
> > lip=127.0.0.1, secured
> > Oct 29 02:32:30 debian dovecot: pop3-login: Disconnected: rip=127.0.0.1,
> > lip=127.0.0.1, secured
> > Oct 29 02:32:31 debian postfix/smtpd[2773]: connect from
> > debian.local[127.0.0.1]
> > Oct 29 02:32:31 debian postfix/smtpd[2773]: lost connection after CONNECT
> > from debian.local[127.0.0.1]
> > Oct 29 02:32:31 debian postfix/smtpd[2773]: disconnect from
> > debian.local[127.0.0.1]
> >
> > Is there something else I can tail to get more info??
> >
> >
> > 2011/10/28 Jamie Cameron <jcameron@webmin.com<http://reply_mail.cgi?new=1&to=jcameron%40webmin%2Ecom>
> > >
> >
> >> You can't telnet to port 993 , as it is for IMAP over SSL .. and telnet
> >> only makes an un-encrypted connection.
> >>
> >> Try telnet to port 143 (un-encrypted IMAP) instead, or use the openssl
> >> command to connect to port 993 like :
> >>
> >> openssl s_client -host mydomain -port 993
> >>
> >> On 28/Oct/2011 16:53 Matías Montenegro <matiasmmontenegro@gmail.com<http://reply_mail.cgi?new=1&to=matiasmmontenegro%40gmail%2Ecom>>
> >> wrote ..
> >>
> >> Hello everybody,
> >>
> >> I'm trying to configure the mailing service (Postfix + Dovecot). It sends
> >> emails perfectly from the server since virtualmin sends me an email every
> >> time a new virtualhost is created, but I can't get to configure my client
> >> (I'm trying with thunderbird) and I tried every possible combination (IMAP,
> >> POP3, SSL/TLS).
> >>
> >> I created a user in the "Create a mail and ftp user" in virtualmin. which
> >> is called test.mydomain
> >>
> >> I access telnet this way:
> >> telnet mydomain 993
> >> Trying xx.xx.xx.xx...
> >> Connected to mydomain.com.
> >> Escape character is '^]'.
> >> user test.mydomain
> >> Connection closed by foreign host.
> >>
> >> In the meanwhile i'm tailing /var/log/mail.log
> >> Oct 28 23:55:19 debian dovecot: imap-login: SSL_accept() failed:
> >> error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol
> >> [yy.yy.yy.yy]
> >> Oct 28 23:55:19 debian dovecot: imap-login: Disconnected:
> >> rip=yy.yy.yy.yy, lip=xx.xx.xx.xx, TLS handshake
> >> Oct 28 23:55:28 debian dovecot: imap-login: Disconnected: rip=127.0.0.1,
> >> lip=127.0.0.1, secured
> >> Oct 28 23:55:30 debian dovecot: pop3-login: Disconnected: rip=127.0.0.1,
> >> lip=127.0.0.1, secured
> >> Oct 28 23:55:31 debian postfix/smtpd[32622]: connect from
> >> debian.local[127.0.0.1]
> >> Oct 28 23:55:31 debian postfix/smtpd[32622]: lost connection after
> >> CONNECT from debian.local[127.0.0.1]
> >> Oct 28 23:55:31 debian postfix/smtpd[32622]: disconnect from
> >> debian.local[127.0.0.1]
> >>
> >> Can anybody give me a clue, I'm completely lost here.
> >>
> >> Thank you
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> Matias
> >>
> >>
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Get your Android app more play: Bring it to the BlackBerry PlayBook
> >> in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
> >> for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
> >> it is! http://p.sf.net/sfu/android-dev2dev
> >>
> >> -
> >> Forwarded by the Webmin mailing list at
> >> webadmin-list@lists.sourceforge.net<http://reply_mail.cgi?new=1&to=webadmin%2Dlist%40lists%2Esourceforge%2Enet>
> >> To remove yourself from this list, go to
> >> http://lists.sourceforge.net/lists/listinfo/webadmin-list
> >>
> >>
> >
> >
> > --
> > Matias
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Get your Android app more play: Bring it to the BlackBerry PlayBook
> > in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
> > for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
> > it is! http://p.sf.net/sfu/android-dev2dev
> >
> > -
> > Forwarded by the Webmin mailing list at
> > webadmin-list@lists.sourceforge.net
> > To remove yourself from this list, go to
> > http://lists.sourceforge.net/lists/listinfo/webadmin-list
> >
> >
>
>
> --
> Matias

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev

-
Forwarded by the Webmin mailing list at webadmin-list@lists.sourceforge.net
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-list




--
Matias