1

Topic: SMTP Relay

==== Required information ====
- iRedMail version:  0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6
- Related log if you're reporting an issue:
====

Hey

How to i relay mail for a domain that i am hosting email for to another server

----

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

2

Re: SMTP Relay

If you have iRedAdmin-Pro installed, just go to profile page of this domain, then set correct relay setting under tab "Relay".
Note: In upcoming release of iRedAdmin-Pro, you can simply bypass recipient verification with a checkbox. Screenshot for your reference.

If you don't have iRedAdmin-Pro, please set value of column "transport" to proper relay setting in SQL table `vmail.domain` for this domain.

http://iredmail.org/images/iredadmin/domain_profile_relay.png

3

Re: SMTP Relay

Hello Zhang,

I have installed iRedAdmin-Pro-Mysql and iredmail and the server is working great with all its features.

I noticed that that relay host through the transport field is not working.  I changed the relay/transport settings from dovecot to smtp:[mail-gateway]:26 in order for outgoing mails from iremail should point to the mail-gateway server on port 26. 

In the log:
postfix/smtp[1811]: AC272CFC552: to=<email-address>, relay=127.0.0.1[127.0.0.1]:10024, delay=9.3, delays=0.06/0.01/0/9.3, dsn=2.0.0, status=sent

You see the relay is localhost

I found nothing unusual i main.cf. 

Any idea??

Thanks for your help

Regards

Shafeek

4

Re: SMTP Relay

You should check log of this smtp session, not just this line. It forwards mail to Amavisd for spam/virus scanning.

5

Re: SMTP Relay

Yes Zhang, I check the whole smtpd session.  Yes it do passes it to amavis for check on 127.0.0.1 and then it is relay to 127.0.0.1 for delivery directly. 


ZhangHuangbin wrote:

You should check log of this smtp session, not just this line. It forwards mail to Amavisd for spam/virus scanning.

6

Re: SMTP Relay

We need some evidence for troubleshooting, could you please:

1. capture a screenshot of your relay setting and attach here.
2. paste full, original log of this smtp session.

7

Re: SMTP Relay

Zhang,

Here you are with the complete session + screenshot.  I change the email address and client server name below. 

Apr 12 08:50:37 mta postfix/smtpd[2503]: connect from host.yy.com[127.0.0.1]
Apr 12 08:50:37 mta postfix/smtpd[2503]: A39F0CFC552: client=host.yy.com[127.0.0.1], sasl_method=LOGIN, sasl_username=user1@yy.com
Apr 12 08:50:37 mta postfix/cleanup[2509]: A39F0CFC552: message-id=<1eaffc5abf58cc82c1253b9799139449@yy.com>
Apr 12 08:50:37 mta postfix/qmgr[1295]: A39F0CFC552: from=<user1@yy.com>, size=563, nrcpt=1 (queue active)
Apr 12 08:50:37 mta roundcube: User user1@yy.com [192.168.92.104]; Message for ss@gmail.com; 250: 2.0.0 Ok: queued as A39F0CFC552
Apr 12 08:50:37 mta postfix/smtpd[2503]: disconnect from host.yy.com[127.0.0.1]

Apr 12 08:50:53 mta postfix/smtpd[2526]: connect from host.yy.com[127.0.0.1]
Apr 12 08:50:53 mta postfix/smtpd[2526]: 9CA00CFC558: client=host.yy.com[127.0.0.1]
Apr 12 08:50:53 mta postfix/cleanup[2509]: 9CA00CFC558: message-id=<1eaffc5abf58cc82c1253b9799139449@yy.com>
Apr 12 08:50:53 mta postfix/smtpd[2526]: disconnect from host.yy.com[127.0.0.1]
Apr 12 08:50:53 mta postfix/qmgr[1295]: 9CA00CFC558: from=<user1@yy.com>, size=1499, nrcpt=1 (queue active)
Apr 12 08:50:53 mta amavis[1161]: (01161-03) Passed CLEAN, MYNETS/MYUSERS LOCAL [127.0.0.1] [127.0.0.1] <user1@yy.com> -> <ss@gmail.com>, Message-ID: <1eaffc5abf58cc82c1253b9799139449@yy.com>, mail_id: uLbZsmLsP6w7, Hits: -10, size: 563, queued_as: 9CA00CFC558, 15927 ms
Apr 12 08:50:53 mta postfix/smtp[2513]: A39F0CFC552: to=<ss@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=16, delays=0.06/0.01/0/16, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=01161-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9CA00CFC558)
Apr 12 08:50:53 mta postfix/qmgr[1295]: A39F0CFC552: removed

Thanks

Shafeek

Post's attachments

iredadmin-pro.png
iredadmin-pro.png 111.68 kb, 1 downloads since 2013-04-12 

You don't have the permssions to download the attachments of this post.

8

Re: SMTP Relay

Oh, my mistake. i just realized you need sender dependent relay setting, not per-domain relay.

*) Per-domain relay you set with iRedAdmin-Pro is used when you RECEIVED an email, then Postfix will relay this RECEIVED email to specified relay host.

*) You need sender dependent relay setting. Please refer to Postfix official doc for more details:
http://www.postfix.org/postconf.5.html# … yhost_maps