https://wiki.zimbra.com/api.php?action=feedcontributions&user=Punit.jain&feedformat=atomZimbra :: Tech Center - User contributions [en]2024-03-28T19:32:23ZUser contributionsMediaWiki 1.39.0https://wiki.zimbra.com/index.php?title=Mails_for_some_users_to_be_routed_to_some_other_MTA&diff=13163Mails for some users to be routed to some other MTA2009-04-13T05:58:00Z<p>Punit.jain: New page: 1. '''The default setting in zimbra is''' : - [zimbra@toi-store ~]$ postconf -n | grep -i transport_maps transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf 2. '''The user in...</p>
<hr />
<div><br />
1. '''The default setting in zimbra is''' : -<br />
<br />
[zimbra@toi-store ~]$ postconf -n | grep -i transport_maps<br />
transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf<br />
<br />
2. '''The user information is lookedup in ldap by default. Create a transport file ( as a zimbra user ) with user informaion whose mails needs to be routed to some other mta.'''<br />
<br />
[zimbra@toi-store conf]$ pwd<br />
/opt/zimbra/conf<br />
<br />
[zimbra@toi-store conf]$ cat transport_file<br />
test1@in.zimbra.com smtp:[10.66.118.238]<br />
<br />
3. postmap /opt/zimbra/conf/transport_file ( creates a Hash file )<br />
<br />
4. A'''dd the entry to already existing postfix_transport_maps as below :''' -<br />
<br />
[zimbra@toi-store ~]$ zmlocalconfig -e 'postfix_transport_maps=hash:/opt/zimbra/conf/transport_file,proxy:ldap:${zimbra_home}/conf/ldap-transport.cf'<br />
<br />
[zimbra@toi-store ~]$ zmlocalconfig | grep -i transport<br />
postfix_transport_maps = hash:/opt/zimbra/conf/transport_file,proxy:ldap:${zimbra_home}/conf/ldap-transport.cf<br />
postfix_virtual_transport = error<br />
<br />
5. '''Restart the mta service''': -<br />
<br />
zmmtactl restart<br />
<br />
Apr 13 13:35:11 toi-store amavis[32247]: (32247-07) FWD via SMTP: <test1@test.com> -> <test1@in.zimbra.com>,BODY=7BIT 250 2.6.0 Ok, id=32247-07, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as A48806C769<br />
Apr 13 13:35:11 toi-store postfix/smtpd[5406]: disconnect from localhost.localdomain[127.0.0.1]<br />
Apr 13 13:35:11 toi-store amavis[32247]: (32247-07) Passed CLEAN, LOCAL [10.66.118.236] [10.66.118.236] <test1@test.com> -> <test1@in.zimbra.com>, Message-ID: <1503027776.461239609910062.JavaMail.root@toi-store.in.zimbra.com>, mail_id: xBh6HfgC7UfZ, Hits: 2.891, size: 645, queued_as: A48806C769, 1505 ms<br />
Apr 13 13:35:11 toi-store postfix/smtp[5403]: 3255F6C768: to=<test1@in.zimbra.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.6, delays=0.02/0.02/0.25/1.3, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as A48806C769)<br />
Apr 13 13:35:11 toi-store postfix/qmgr[2603]: 3255F6C768: removed<br />
Apr 13 13:35:11 toi-store '''postfix/smtp[5407]: A48806C769: to=<test1@in.zimbra.com>, relay=10.66.118.238[10.66.118.238]:25''', delay=0.25, delays=0.01/0.03/0.17/</div>Punit.jainhttps://wiki.zimbra.com/index.php?title=Allow_only_few_users_to_send_mails&diff=8472Allow only few users to send mails2008-04-18T11:36:09Z<p>Punit.jain: </p>
<hr />
<div>'''Allow only few users to send mails'''<br />
<br />
----<br />
<br />
Requirement "in a domain there may be a requirement of restricting few users from sending mails (local or public) while allowing other users to send mails" .<br />
<br />
Here is how to implement the requirement in zimbra. If using elsewhere please make sure to change the domain.<br />
<br />
a) In /opt/zimbra/conf enter following lines in zmmta.cf<br />
<br />
<br />
POSTCONF smtpd_sender_restrictions FILE postfix_sender_restrictions.cf<br />
<br />
<br />
b) Modify postfix_sender_restrictions.cf to add following line to the top of the file: -<br />
<br />
check_sender_access hash:/opt/zimbra/conf/sender_acl<br />
reject<br />
<br />
<br />
c) In /opt/zimbra/conf/sender_acl add all the users in the domain:-<br />
<br />
test1@test.in.zimbra.com DUNNO<br />
<br />
test2@test.in.zimbra.com DUNNO<br />
<br />
test3@test.in.zimbra.com REJECT<br />
<br />
test.in.zimbra.com REJECT<br />
<br />
<br />
d) We need to postmap sender_acl using :-<br />
<br />
postmap /opt/zimbra/conf/sender_acl <br />
<br />
This creates a hashed db file of users which is referenced every time mail is sent from the domain.<br />
<br />
<br />
e) Restart postfix as a zimbra user<br />
<br />
postfix restart</div>Punit.jainhttps://wiki.zimbra.com/index.php?title=Allow_only_few_users_to_send_mails&diff=8471Allow only few users to send mails2008-04-18T11:35:43Z<p>Punit.jain: New page: '''Allow only few users to send mails''' ---- Requirement "in a domain there may be a requirement of restricting few users from sending mails (local or public) while allowing other users...</p>
<hr />
<div>'''Allow only few users to send mails'''<br />
<br />
----<br />
<br />
Requirement "in a domain there may be a requirement of restricting few users from sending mails (local or public) while allowing other users to send mails" .<br />
<br />
Here is how to implement the requirement in zimbra. If using elsewhere please make sure to change the domain.<br />
<br />
a) In /opt/zimbra/conf enter following lines in zmmta.cf<br />
<br />
POSTCONF smtpd_sender_restrictions FILE postfix_sender_restrictions.cf<br />
<br />
<br />
b) Modify postfix_sender_restrictions.cf to add following line to the top of the file: -<br />
<br />
check_sender_access hash:/opt/zimbra/conf/sender_acl<br />
reject<br />
<br />
<br />
c) In /opt/zimbra/conf/sender_acl add all the users in the domain:-<br />
<br />
test1@test.in.zimbra.com DUNNO<br />
<br />
test2@test.in.zimbra.com DUNNO<br />
<br />
test3@test.in.zimbra.com REJECT<br />
<br />
test.in.zimbra.com REJECT<br />
<br />
<br />
d) We need to postmap sender_acl using :-<br />
<br />
postmap /opt/zimbra/conf/sender_acl <br />
<br />
This creates a hashed db file of users which is referenced every time mail is sent from the domain.<br />
<br />
<br />
e) Restart postfix as a zimbra user<br />
<br />
postfix restart</div>Punit.jain