1

Topic: Connect to SMTP with Thunderbird

Hi,

I have kind of solved all my previous problems with my iRedMail implementation on a Ubuntu 10.04.1 LTS server.

I can now both send and receive mail with Roundcube, I can connect to the server with IMAP SSL/TSL Port: 993.
But I cant figure out how to connect to the SMTP server with Thunderbird.

The hostname is mail.mydomain.se, so I tried to connect with the hostname as SMTP address but nothing works, neither No security/STARTTSL  SSL/TSL.

I also tried to connect with the servers ip address  and smtp.myserver.se but no success.

The logs says nothing. Im stuck.

Thanks in advance.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Connect to SMTP with Thunderbird

Port 25 with STARTTLS.

3 (edited by ippif 2010-10-28 19:39:45)

Re: Connect to SMTP with Thunderbird

ZhangHuangbin wrote:

Port 25 with STARTTLS.

Thanks for the fast support Zhang!

Sadly It didn't work for me, but I got something logged in syslog:


Oct 28 13:34:00 mail postfix/smtpd[7668]: warning: No server certs available. TLS won't be enabled
Oct 28 13:34:00 mail postfix/smtpd[7668]: connect from m83-188-211-XX.cust.tele2.se[83.188.211.XX]
Oct 28 13:34:00 mail postfix/smtpd[7668]: warning: Wrapper-mode request dropped from m83-188-211-33.cust.tele2.se[83.188.211.XX] for service smtps. TLS context initialization failed. For details see earlier warnings in your logs.
Oct 28 13:34:00 mail postfix/smtpd[7668]: disconnect from m83-188-211-XX.cust.tele2.se[83.188.211.XX]

I think I just have to figure out why there is no certs available and how to make them available.

4

Re: Connect to SMTP with Thunderbird

This is my thunderbird setting of SMTP server:
http://screenshots.iredmail.googlecode.com/hg/mua/thunderbird.smtp.png

And POP3/IMAP setting:
http://screenshots.iredmail.googlecode.com/hg/mua/thunderbird.pop.png

5

Re: Connect to SMTP with Thunderbird

To be clear, STARTTLS and SSL/TLS is different.

6

Re: Connect to SMTP with Thunderbird

Hi again, I solved my problem and now my implementation work as I want.

It only seem to work with SSL/TSL on port 465 with user/pwd authentication.

This is what I changed in /etc/postfix/main.cf

First I added, so It should know that the certs exist:

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.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

Second I added:

relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql_relay_domains.cf

And last this parameters to "smtpd_recipient_restrictions":

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, permit_inet_interfaces, check_relay_domains


This is my Main.cf that works for me:

#
# Uncomment the following line to enable policyd sender throttle.
#

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.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_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10032
mailbox_command = /usr/lib/dovecot/deliver
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
#smtpd_sasl_path = dovecot-auth
smtpd_sasl_path = private/dovecot-auth
content_filter = smtp-amavis:[127.0.0.1]:10024
mydestination = $myhostname, localhost.$mydomain, localhost
alias_maps = hash:/etc/aliases
mynetworks = 127.0.0.0/8
mail_version = 2.7.0-1
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql_relay_domains.cf
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, permit_inet_interfaces, check_relay_domains
myhostname = mail.mydomain.se
mydomain = mydomain.se
#relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql_relay_domains.cf
virtual_mailbox_base = /var/vmail/vmail01
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

One thing that I found out was that It didn't seem to work if the "smtpd_recipient_restrictions" was on a line before "relay_domains", you can see that I commented out one "relay_domains" line that was after "smtpd_recipient_restrictions".
When I did that It worked.

Thanks for the good support once again ZhangHuangbin, kudos!

7

Re: Connect to SMTP with Thunderbird

Does SSL must be installed or already installed?
Greetings!

8

Re: Connect to SMTP with Thunderbird

tuxtux wrote:

Does SSL must be installed or already installed?

A self-signed SSL cert/key will be installed by default.

9 (edited by tuxtux 2011-10-31 12:50:45)

Re: Connect to SMTP with Thunderbird

I installed iRedOS 0.6 on CentOS 5.5, MySQL
but don't exist the path /etc/ssl/certs/iRedMail_CA.pem
/etc/ssl/private/iRedMail.key,
but exists /etc/pki/tls/private/iRedMail.key
/etc/pki/tls/certs/iRedMail_CA.pem,

I can not send via SMTP, but I can receive IMAP.

How to configure Thunderbird for to send messages with  SMTP?

I would like to configure my mail server to send mail via SMTP from anywhere in the world, how is this done?
Greetings and thanks for replying!

10

Re: Connect to SMTP with Thunderbird

tuxtux wrote:

I would like to configure my mail server to send mail via SMTP from anywhere in the world, how is this done?

How do you currently configure your Thunderbird?

Here's FAQ: How to configure Thunderbird for iRedMail.
http://iredmail.org/wiki/index.php?titl … r.iRedMail

11 (edited by tuxtux 2011-10-31 22:41:19)

Re: Connect to SMTP with Thunderbird

ZhangHuangbin wrote:

How do you currently configure your Thunderbird?

-----------------
name server: mail.mydomain.com
user name: myaccount@mydomain.com
IMAP
port:143
STARTTLS
normal password


I have configured as the tutorial says,
Server Name: mail.mydomain.com
port: 587
STARTTLS
normal Password
myaccount@mydomain.com,

I can receive and view my emails, but I can not send via SMTP.

Is there another way?
Thanks!!

12

Re: Connect to SMTP with Thunderbird

tuxtux wrote:

I can receive and view my emails, but I can not send via SMTP.

Does Thunderbird report any error message?
Any error log in your mail server's log files? it should be /var/log/maillog.

13

Re: Connect to SMTP with Thunderbird

TEST 1:

server name:mail.mydomain.com
port: 25
Connection security: STARTTLS
Authentication method: Normal password
User Name: carlos

Result in the maillog:

Nov  1 17:36:43 loltun postfix/smtpd[26526]: connect from unknown[xxx.xxx.xxx.xxx]
Nov  1 17:36:43 loltun postfix/smtpd[26526]: disconnect from unknown[xxx.xxx.xxx.xxx]

Could not send the message from Thunderbird.

--------------------------------------------------------------
TEST 2:

server name:mail.mydomain.com
port: 25
Connection security: STARTTLS
Authentication method: Normal password
User Name: carlos@mydomain.com

Result in the maillog:

Nov  1 17:40:17 loltun postfix/smtpd[26528]: connect from unknown[xxx.xxx.xxx.xxx]
Nov  1 17:40:17 loltun postfix/smtpd[26528]: disconnect from unknown[xxx.xxx.xxx.xxx]

Could not send the message from Thunderbird.
----------------------------------------------------------------

TEST 3:

server name:mail.mydomain.com
port: 587
Connection security: STARTTLS
Authentication method: Normal password
User Name: carlos@mail.mydomain.com

Could not send the message from Thunderbird.
Do not mark anything in the maillog.

---------------------------------------------------------------
Test 4:

server name: mail.mydomain.com
port: 587
Connection security: None
Authentication method: Normal Password
User Name:carlos

It allows sending messages via SMTP through Thunderbird.

But outside the server network I can not send emails through Thunderbird.

in main.cf of postfix
    mynetworks = 127.0.0.0/8
I use ired of iredmail.org with mysql

Where would the problem?
Help!
Thanks!!!!!!!!

14

Re: Connect to SMTP with Thunderbird

This setting works fine for me:
http://iredmail.org/wiki/index.php?titl … l_via_SMTP

server name: Your mail server hostname of IP address.
port: 587
Connection security: STARTTLS
Authentication method: Normal Password
User Name: MUST be a full email address

15 (edited by tuxtux 2011-11-03 00:14:44)

Re: Connect to SMTP with Thunderbird

Ok. I will try.

A question.
The result of messages sent from Logwatch. Are these messages sent by my server?.

Total: 1093 message sent
Checking with the comand

cat /var/log/maillog | grep "Message for"

in all logs generated.
Accounted for about 100 messages sent.

I have found to have tried to send messages to mailboxes that do not exist on my server and my server has rejected, when the server rejects users who do not exist on the server, there comes a message that the sender as undeliverable.
1. Does the error message sent to the sender 550 is counted as one message sent from my server?
2. Would using my server to send spam?.
3. IredOS is configured with openrelay?

Thank you for responding, and let down the results of Logwatch.


Greetings!
Excuse the English, I use the google translator.
I'm not good with English.
Good day!


First message of Logwatch wrote:

--------------------- postfix Begin ------------------------
541962 bytes transferred
103 messages sent
103 messages removed from queue

Unknown users: 28, 32 Time(s)

SASL Authenticated messages from: 1 Host(s), 18 Time(s)

Connections lost:
    Connection lost while RCPT : 1 Time(s)
------------------------------------------------------------

Second message of logwatch wrote:

--------------------------------------------------------
71065432 bytes transferred
185 messages sent
160 messages removed from queue
25 messages exceeded queue or message file size limit and removed

Unknown users: 46, 103 Time(s)

SASL Authentication failed from: 1 Host(s), 12 Time(s)

SASL Authenticated messages from: 1 Host(s), 17 Time(s)

Connections lost:
    Connection lost while AUTH : 12 Time(s)
    Connection lost while CONNECT : 3 Time(s)
    Connection lost while END-OF-MESSAGE : 3 Time(s)
    Connection lost while RCPT : 38 Time(s)
    Connection lost while RSET : 2 Time(s)


Malformed domain name in resource data of MX record: 1 Domain(s), 1 Time(s)

Hostname validation errors: 1 Message(s), 1 Time(s)

Unrecognized warning:
     TLS library problem: 5053:error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca:s3_pkt.c:1086:SSL alert number 48: : 1 Time(s)
.............................................................................

Third message of logwatch wrote:

--------------------- postfix Begin ------------------------
36399153 bytes transferred
178 messages sent
174 messages removed from queue

Unknown users: 42, 82 Time(s)

SASL Authenticated messages from: 1 Host(s), 2 Time(s)

Connections lost:
    Connection lost while END-OF-MESSAGE : 2 Time(s)
    Connection lost while RCPT : 36 Time(s)
    Connection lost while RSET : 1 Time(s)

4..Logwatch.....................4  wrote:

17899883 bytes transferred
159 messages sent
159 messages removed from queue

Unknown users: 40, 72 Time(s)

SASL Authenticated messages from: 1 Host(s), 11 Time(s)

Connections lost:
    Connection lost while RCPT : 19 Time(s)
    Connection lost while RSET : 1 Time(s)

5...Log watch..................5 wrote:

632680 bytes transferred
79 messages sent
79 messages removed from queue
2 messages exceeded queue or message file size limit and removed

Unknown users: 27, 43 Time(s)

SASL Authenticated messages from: 1 Host(s), 1 Time(s)

Too many errors in SMTP commands dialog: 1 Command(s), 2 Time(s)

Connections lost:
    Connection lost while CONNECT : 1 Time(s)
    Connection lost while RCPT : 25 Time(s)

6.....Log watch....................6 wrote:

77588 bytes transferred
6 messages sent
6 messages removed from queue

Unknown users: 20, 24 Time(s)

Connections lost:
    Connection lost while RCPT : 3 Time(s)


Malformed domain name in resource data of MX record: 1 Domain(s), 1 Time(s)

Hostname validation errors: 1 Message(s), 1 Time(s)

7....Log watch...........................7 wrote:

37720993 bytes transferred
151 messages sent
151 messages removed from queue

Unknown users: 43, 83 Time(s)

SASL Authenticated messages from: 2 Host(s), 8 Time(s)

Connections lost:
    Connection lost while CONNECT : 1 Time(s)
    Connection lost while RCPT : 30 Time(s)
    Connection lost while STARTTLS : 1 Time(s)


Unrecognized warning:
     TLS library problem: 21808:error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca:s3_pkt.c:1086:SSL alert number 48: : 1 Time(s)

8-----------------------8 wrote:

85952527 bytes transferred
232 messages sent
233 messages removed from queue

Unknown users: 42, 63 Time(s)

SASL Authenticated messages from: 2 Host(s), 17 Time(s)

Connections lost:
    Connection lost while END-OF-MESSAGE : 1 Time(s)
    Connection lost while RCPT : 23 Time(s)


Malformed domain name in resource data of MX record: 1 Domain(s), 1 Time(s)

Hostname validation errors: 1 Message(s), 1 Time(s)

16

Re: Connect to SMTP with Thunderbird

tuxtux wrote:

The result of messages sent from Logwatch. Are these messages sent by my server?.

Yes, sent by your server, via a cron job.

tuxtux wrote:

I have found to have tried to send messages to mailboxes that do not exist on my server and my server has rejected, when the server rejects users who do not exist on the server, there comes a message that the sender as undeliverable.
1. Does the error message sent to the sender 550 is counted as one message sent from my server?

You didn't show us related log of this kind of rejected message, so it's hard for me to help troubleshoot.

tuxtux wrote:

2. Would using my server to send spam?.
3. IredOS is configured with openrelay?

iRedMail won't leave backdoor or similiar issue on your server, so it won't be used to send spam by iRedMail.
iRedMail, iRedOS is not an open relay by default.

17 (edited by tuxtux 2011-11-04 07:15:08)

Re: Connect to SMTP with Thunderbird

Thanks for answering!

maillog wrote:

Nov  3 15:09:44 loltun postfix/smtpd[1535]: connect from unknown[xxx.xxxx.xxx.xxx]
Nov  3 15:09:45 loltun postfix/smtpd[1535]: NOQUEUE: reject: RCPT from unknown[xxx.xxx.xxx.xxx]: 550 5.1.1 <DoesNotExist@mydomain.com>: Recipient address rejected: User unknown in virtual mailbox table; from=<somebody@gmail.com> to=<DoesNotExist@mydomain.com> proto=SMTP helo=<may.com>
Nov  3 15:09:45 loltun postfix/smtpd[1535]: disconnect from unknown[xxx.xxx.xxx.xxx].

It says when I send a user does not exist in my mail server IredMail, this is correct because DoesNotExist@mydomain.com does not exist.
1. Now my question is, this response creates a message, and is counted as sent message?.

Because I have received many rejections emails do not exist on my server.

Gmail wrote:

Delivery to the following recipient failed permanently:

     DoesNotExist@mydomain.com


Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550-Callout verification failed:
550-550 5.1.1 <DoesNotExist@mydomain.com>: Recipient address rejected:
550 User unknown in virtual mailbox table (state 14).

When the user does not exist, Gmail responds with this message to my account.
My server sends a message to Gmail?
Does  justify the result of Logwatch of sent messages?.

Or because there are many messages sent, if I have not sent so many messages?
In the most recent statistics showed only 88 messages sent, and low, it is good!.

Greetings!
Good day!

18

Re: Connect to SMTP with Thunderbird

tuxtux wrote:

When the user does not exist, Gmail responds with this message to my account.
My server sends a message to Gmail?

Yes.