We offer remote upgrade service, check the price and contact us.
sender_dependent_relayhost_maps
.virusalert
on non-Debian/Ubuntu OSes/etc/iredmail-release
with new iRedMail version numberiRedMail stores the release version in /etc/iredmail-release
after
installation, it's recommended to update this file after you upgraded iRedMail,
so that you can know which version of iRedMail you're running. For example:
# File: /etc/iredmail-release
0.9.5
Please follow below tutorial to upgrade iRedAPD to the latest stable release: Upgrade iRedAPD to the latest stable release
Detailed release notes are available here.
Note: this is applicable to only RHEL and CentOS.
In iRedMail-0.9.4 and earlier releases, iRedMail didn't enable cron job to update SpamAssassin rules. Please run commands below to fix it.
perl -pi -e 's/^(SAUPDATE=yes)/#${1}/' /etc/sysconfig/sa-update
echo 'SAUPDATE=yes' >> /etc/sysconfig/sa-update
Note: this is applicable to only RHEL and CentOS if you're running Nginx + php-fpm.
In iRedMail-0.9.4 and earlier releases, iRedMail didn't create directory used to store PHP session files, it will cause error when your PHP application tries to create session file. Please fix it with commands below:
mkdir /var/lib/php/session
chown root:root /var/lib/php/session
chmod 0773 /var/lib/php/session
chmod o+t /var/lib/php/session
virusalert
on non-Debian/Ubuntu OSesNote: this is NOT applicable to Debian and Ubuntu.
There's a bug in iRedMail-0.9.4, it adds alias virusalert
on only Debian and
Ubuntu, but not other OSes. Please fix it with below commands:
perl -pi -e 's/(virusalert:.*)/#${1}/g' /etc/postfix/aliases
echo -e '\nvirusalert: root' >> /etc/postfix/aliases
postalias /etc/postfix/aliases
perl -pi -e 's/(virusalert:.*)/#${1}/g' /usr/local/etc/postfix/aliases
echo -e '\nvirusalert: root' >> /usr/local/etc/postfix/aliases
postalias /usr/local/etc/postfix/aliases
sender_dependent_relayhost_maps
Postfix setting relayhost
allows Postfix to relay outbound emails to
specified mail server instead of connecting recipient server directly. Sender
dependent relayhost (controlled by parameter sender_dependent_relayhost_maps
)
allows you to define per-user or per-domain relayhost, it
overrides the global relayhost
parameter setting. Specified query tables are
searched by the envelope sender address (user@domain.com
) and domain name
(@domain.com
). For more details, please read Postfix document:
sender_dependent_relayhost_maps
To support sender_dependent_relayhost_maps
, we need some modification on
iRedMail server:
vmail.sender_relayhost
/etc/postfix/mysql/sender_dependent_relayhost_maps.cf
sender_dependent_relayhost_maps
vmail.sender_relayhost
Please connect to MySQL server as MySQL root user, and execute SQL commands below to create this new table:
# mysql -uroot -p
sql> USE vmail;
sql> CREATE TABLE IF NOT EXISTS sender_relayhost (
id BIGINT(20) UNSIGNED AUTO_INCREMENT,
account VARCHAR(255) NOT NULL DEFAULT '',
relayhost VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (id),
UNIQUE INDEX (account)
) ENGINE=InnoDB;
sender_dependent_relayhost_maps.cf
/etc/postfix/mysql/catchall_maps.cf
to /etc/postfix/mysql/sender_dependent_relayhost_maps.cf
./usr/local/etc/postfix/mysql/catchall_maps.cf
to /usr/local/etc/postfix/mysql/sender_dependent_relayhost_maps.cf
.Open file sender_dependent_relayhost_maps.cf
, REPLACE the query =
line
by below one:
query = SELECT relayhost FROM sender_relayhost WHERE account='%s' LIMIT 1
/etc/postfix/main.cf
We need to update 2 parameters in Postfix config file: proxy_read_maps
,
sender_dependent_relayhost_maps
.
postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:mysql:/etc/postfix/mysql/sender_dependent_relayhost_maps.cf'
Reload or restart Postfix service is required.
postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:mysql:/usr/local/etc/postfix/mysql/sender_dependent_relayhost_maps.cf'
Reload or restart Postfix service is required.
sender_dependent_relayhost_maps
Postfix setting relayhost
allows Postfix to relay outbound emails to
specified mail server instead of connecting recipient server directly. Sender
dependent relayhost (controlled by parameter sender_dependent_relayhost_maps
)
allows you to define per-user or per-domain relayhost, it
overrides the global relayhost
parameter setting. Specified query tables are
searched by the envelope sender address (user@domain.com
) and domain name
(@domain.com
). For more details, please read Postfix document:
sender_dependent_relayhost_maps
To support sender_dependent_relayhost_maps
, we need some modification on
iRedMail server:
vmail.sender_relayhost
/etc/postfix/mysql/sender_dependent_relayhost_maps.cf
sender_dependent_relayhost_maps
vmail.sender_relayhost
Please follow steps below to create this new table:
# su - postgres
$ psql -d vmail
sql> CREATE TABLE sender_relayhost (
id SERIAL PRIMARY KEY,
account VARCHAR(255) NOT NULL DEFAULT '',
relayhost VARCHAR(255) NOT NULL DEFAULT ''
);
sql> CREATE INDEX idx_sender_relayhost_account ON sender_relayhost (account);
sender_dependent_relayhost_maps.cf
/etc/postfix/pgsql/catchall_maps.cf
to /etc/postfix/pgsql/sender_dependent_relayhost_maps.cf
./usr/local/etc/postfix/pgsql/catchall_maps.cf
to /usr/local/etc/postfix/pgsql/sender_dependent_relayhost_maps.cf
.Open file sender_dependent_relayhost_maps.cf
, REPLACE the query =
line
by below one:
query = SELECT relayhost FROM sender_relayhost WHERE account='%s' LIMIT 1
/etc/postfix/main.cf
We need to update 2 parameters in Postfix config file: proxy_read_maps
,
sender_dependent_relayhost_maps
.
postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:pgsql:/etc/postfix/pgsql/sender_dependent_relayhost_maps.cf'
Reload or restart Postfix service is required.
postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:mysql:/usr/local/etc/postfix/mysql/sender_dependent_relayhost_maps.cf'
Reload or restart Postfix service is required.
All documents are available in BitBucket repository, and published under Creative Commons license. If you found something wrong, please do contact us to fix it.