1 (edited by rtukpe 2017-03-15 00:40:24)

Topic: OutBound Messages Are Not Being Saved

==== Required information ====
- iRedMail version: 0.9.6
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend: MySQL
- Web server: Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hi,

I have successfully installed iRedMail on my Ubuntu droplet and I'm using Nodemailer (Node.js) to send mails in my application.

Now the thing is the messages are being sent and delivered but they are not being saved in the MySQL database. When I send using RoundCube or Thunderbird the mails are saved.

This is the postfix log for the unsaved mail:

Mar 14 15:52:50 mail postfix/submission/smtpd[7230]: connect from unknown[41.58.184.250]
Mar 14 15:52:51 mail postfix/submission/smtpd[7230]: Anonymous TLS connection established from unknown[41.58.184.250]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Mar 14 15:52:52 mail postfix/submission/smtpd[7230]: 0077E1B7782: client=unknown[41.58.184.250], sasl_method=PLAIN, sasl_username=ray@demo.kornet-test.com
Mar 14 15:52:52 mail postfix/cleanup[7237]: 0077E1B7782: message-id=<76615376-3324-857a-b9af-4cd171db2727@demo.kornet-test.com>
Mar 14 15:52:52 mail postfix/qmgr[3715]: 0077E1B7782: from=<ray@demo.kornet-test.com>, size=5094, nrcpt=1 (queue active)
Mar 14 15:52:52 mail postfix/submission/smtpd[7230]: disconnect from unknown[41.58.184.250] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 commands=7
Mar 14 15:52:53 mail postfix/10025/smtpd[7245]: connect from mail.kornet-test.com[127.0.0.1]
Mar 14 15:52:53 mail postfix/10025/smtpd[7245]: 039BB1B7783: client=mail.kornet-test.com[127.0.0.1]
Mar 14 15:52:53 mail postfix/cleanup[7237]: 039BB1B7783: message-id=<76615376-3324-857a-b9af-4cd171db2727@demo.kornet-test.com>
Mar 14 15:52:53 mail postfix/10025/smtpd[7245]: disconnect from mail.kornet-test.com[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Mar 14 15:52:53 mail postfix/qmgr[3715]: 039BB1B7783: from=<ray@demo.kornet-test.com>, size=6197, nrcpt=1 (queue active)
Mar 14 15:52:53 mail amavis[2955]: (02955-02) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [41.58.184.250]:62872 [41.58.184.250] <ray@demo.kornet-test.com> -> <rtukpe@gmail.com>, Queue-ID: 0077E1B7782, Message-ID: <76615376-3324-857a-b9af-4cd171db2727@demo.kornet-test.com>, mail_id: L-IB2HugW3zI, Hits: -0.998, size: 5094, queued_as: 039BB1B7783, dkim_new=dkim:demo.kornet-test.com, 595 ms, Tests: [ALL_TRUSTED=-1,HTML_MESSAGE=0.001,URIBL_BLOCKED=0.001]
Mar 14 15:52:53 mail postfix/smtp-amavis/smtp[7242]: 0077E1B7782: to=<rtukpe@gmail.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.2, delays=0.61/0.01/0.01/0.6, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 039BB1B7783)
Mar 14 15:52:53 mail postfix/qmgr[3715]: 0077E1B7782: removed
Mar 14 15:52:53 mail postfix/smtp[7246]: Untrusted TLS connection established to gmail-smtp-in.l.google.com[64.233.162.27]:25: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Mar 14 15:52:54 mail postfix/smtp[7246]: 039BB1B7783: to=<rtukpe@gmail.com>, relay=gmail-smtp-in.l.google.com[64.233.162.27]:25, delay=1.3, delays=0.01/0.03/0.51/0.74, dsn=2.0.0, status=sent (250 2.0.0 OK 1489506774 k10si8425896lfe.194 - gsmtp)
Mar 14 15:52:54 mail postfix/qmgr[3715]: 039BB1B7783: removed
Mar 14 15:56:12 mail postfix/anvil[7232]: statistics: max connection rate 1/60s for (submission:41.58.184.250) at Mar 14 15:52:50
Mar 14 15:56:12 mail postfix/anvil[7232]: statistics: max connection count 1 for (submission:41.58.184.250) at Mar 14 15:52:50
Mar 14 15:56:12 mail postfix/anvil[7232]: statistics: max cache size 1 at Mar 14 15:52:50

----

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

2

Re: OutBound Messages Are Not Being Saved

This is expected.

Saving sent email is not part of SMTP protocol, but MUA like Outlook, Thunderbird, or webmail usually saves a copy of sent email.

3

Re: OutBound Messages Are Not Being Saved

Thanks. I figured it out.
I had to create an IMAP client to save and retrieve the mails from iRedMail's database.