1

Topic: Email routing with iRedMail

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

iRedMail current version
Centos 6 64 bits
Apache

I have a dedicated server with 128 Public IPs. I want to use iredmail on this server with lots of domains.

Can iredmail be used for email delivery through multiple IPs assigned to my server?

Is there a guide/tutorial to configure different domains/useraccounts to deliver outbound emails through the different IPs assigned to the server?

----

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

2

Re: Email routing with iRedMail

We have a tutorial for you:
http://www.iredmail.org/docs/send.out.e … esses.html

But here's the question: Why you need to assign each mail domain a unique IP address? Usually we host multiple mail domains with just one IP address, some servers may have 2 or few more, but you don't need to assign each domain a unique IP.

3

Re: Email routing with iRedMail

I followed the information given in the tutorial but when I try to reload postfix it gives fatal error and it does not work. postfix does not start/reload

[root@bss213 ~]# postfix reload

postfix: fatal: /etc/postfix/main.cf, line 274-276: missing '=' after attribute name: "barc001-smtp     unix -       -       n       -       -       smtp    -o smtp_bind_address=74.221.209.3  "

[root@bss213 ~]#

4

Re: Email routing with iRedMail

You added the content in /etc/postfix/main.cf, but it should be added in /etc/postfix/master.cf. Please read the tutorial carefully.

5

Re: Email routing with iRedMail

Thank you it is working.

I read that postifx will retry emails for 5 days before it will stop and email will be removed from the queue. That is too much.

I want to set email delivery to be retried only 3 times before it is removed from the queue permanently. And maximum time email should be in queue should be only 3 hours.

How do I set or configure the maximum delivery retry times/duration for emails in queue.

6

Re: Email routing with iRedMail

I checked the main.cf and master.cf files. there is no parameters to configure the delivery retry interval

7

Re: Email routing with iRedMail

willidex wrote:

Thank you it is working.

I read that postifx will retry emails for 5 days before it will stop and email will be removed from the queue. That is too much.

I want to set email delivery to be retried only 3 times before it is removed from the queue permanently. And maximum time email should be in queue should be only 3 hours.

How do I set or configure the maximum delivery retry times/duration for emails in queue.

I posted a message on the postfix mailing list with this question quoted verbatim.  Once I get a response, I will post it here for everyone to see.

8 (edited by robert.wolfe 2016-03-13 01:52:27)

Re: Email routing with iRedMail

willidex wrote:

Thank you it is working.

I read that postifx will retry emails for 5 days before it will stop and email will be removed from the queue. That is too much.

I want to set email delivery to be retried only 3 times before it is removed from the queue permanently. And maximum time email should be in queue should be only 3 hours.

How do I set or configure the maximum delivery retry times/duration for emails in queue.

From a message in the postfix mailing list (original sender credited):

-------- Forwarded Message --------
Subject:     Re: Postfix Queue
Date:     Sat, 12 Mar 2016 17:19:51 +0000
From:     Viktor Dukhovni
Reply-To:     postfix-users@postfix.org
To:     postfix-users@postfix.org


On Sat, Mar 12, 2016 at 01:14:17AM -0800, Robert Wolfe wrote:

> "I read that postifx will retry emails for 5 days before it will stop and
> email will be removed from the queue. That is too much.

https://tools.ietf.org/html/rfc5321#section-4.5.4.1

   Retries continue until the message is transmitted or the sender gives
   up; the give-up time generally needs to be at least 4-5 days.  It MAY
   be appropriate to set a shorter maximum number of retries for non-
   delivery notifications and equivalent error messages than for
   standard messages.  The parameters to the retry algorithm MUST be
   configurable.

This advice should be taken seriously.  However, in some environments
it is also important to notify the sender that their email did not
get through in a timely manner.  Therefore,  reducing that timeout to
2-3 days is not unreasonable, in combination with

    http://www.postfix.org/postconf.5.html# … rning_time

    # Warn sender of trouble after 2 hours, continue to retry for 2 days
    #
    delay_warning_time = 2h
    maximal_queue_lifetime = 2d

> "I want to set email delivery to be retried only 3 times before it is
> removed from the queue permanently. And maximum time email should be in
> queue should be only 3 hours.

This is a bad idea, and if the OP's organization is spamming and
cares not for the delivery of their email, they can use some other
MTA.  People who ask for short queue lifetime generally have some
other problem they've failed to describe or address.  The best
thing is to ask them what their real problem is, though it is
possible they have OCD and want to tune the queue lifetime "just
because"...

Postfix will only give up after a failed delivery that occurs at
least maximal_queue_lifetime after the message is received.  If
the mail queue has a multi-day backlog, this could in principle be
multiple days after the configured maximal_queue_lifetime.

> How do I set or configure the maximum delivery retry times/duration for
> emails in queue."

The relevant parameters are

    http://www.postfix.org/postconf.5.html# … e_lifetime
    http://www.postfix.org/postconf.5.html# … e_lifetime
    http://www.postfix.org/postconf.5.html# … rning_time
    http://www.postfix.org/postconf.5.html# … ckoff_time

For queue tuning advice, users should consult:

    http://www.postfix.org/QSHAPE_README.html

--
    Viktor.