diff --git a/.gitattributes b/.gitattributes index 1076bdf8..ca6d93bb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -480,6 +480,7 @@ etc/alternc/templates/postfix/myalias.cf -text etc/alternc/templates/postfix/mydomain.cf -text etc/alternc/templates/postfix/mygid.cf -text etc/alternc/templates/postfix/myquota.cf -text +etc/alternc/templates/postfix/myrelay-domain.cf -text etc/alternc/templates/postfix/myrelay.cf -text etc/alternc/templates/postfix/mytransport.cf -text etc/alternc/templates/postfix/myvirtual.cf -text diff --git a/etc/alternc/postfix.cf b/etc/alternc/postfix.cf index bd8429ac..8fcd97c8 100644 --- a/etc/alternc/postfix.cf +++ b/etc/alternc/postfix.cf @@ -41,6 +41,8 @@ virtual_mailbox_base = /var/alternc/mail virtual_minimum_uid = 2000 virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf virtual_uid_maps = proxy:mysql:/etc/postfix/mygid.cf +relay_recipient_maps = $virtual_alias_maps +relay_domains = proxy:mysql:/etc/postfix/myrelay-domain.cf transport_maps = proxy:mysql:/etc/postfix/mytransport.cf dovecot_destination_recipient_limit = 1 mailman_destination_recipient_limit = 1 diff --git a/etc/alternc/templates/postfix/myrelay-domain.cf b/etc/alternc/templates/postfix/myrelay-domain.cf new file mode 100644 index 00000000..58b54419 --- /dev/null +++ b/etc/alternc/templates/postfix/myrelay-domain.cf @@ -0,0 +1,10 @@ +# +# %%warning_message%% +# + +user = %%db_mail_user%% +password = %%db_mail_pwd%% +hosts =%%dbhost%% +dbname = %%dbname%% +query = select name from mailman where domain = '%d' +