Set up masquerading and genericstable in AIX 7.2 TL 5 and later

How To

Summary

Because a new sendmail version is implemented in AIX 7.2 TL 5 the approach to implement masquerading and genericstable changed.

Environment

Applies to AIX 7.2 TL 5 and later versions that implement the new sendmail version.

Steps

How to set up masquerading

To enable the masquerading, it is necessary to build a submit.cf implementing this feature with the following procedure:

cd /usr/samples/tcpip/sendmail/cf

cp submit.mc submit-masquerade.mc

vi submit-masquerade.mc

At the end of the file, the following line needs to be added:

MASQUERADE_AS(`masquerade.domain.com')

The special syntax of the single quotation marks needs to be observed. After the file is saved, it can be compiled:

m4 ../m4/cf.m4 submit-masquerade.mc > /tmp/submit.cf

If there are no errors, the submit.cf file can be installed:

cd /etc/mail

mv submit.cf submit.cf.org

cp /tmp/submit.cf .

How to enable the genericstable

To enable the genericstable, it is also necessary to build a submit.cf containing this feature, by using the following procedure:

cd /usr/samples/tcpip/sendmail/cf

cp submit.mc submit-generics.mc

vi submit-generics.mc

The following line:

FEATURE(genericstable)dnl

needs to be added preceding the line that contains "dnl" only. After the file is saved, it is compiled with

m4 ../m4/cf.m4 submit-generics.mc > /tmp/submit.cf

If this command runs without error, the submit.cf file is installed the same way with:

cd /etc/mail

mv submit.cf submit.cf.org

cp /tmp/submit.cf .

The procedure to create the genericstable is the same as for earlier sendmail versions.

The file "/etc/mail/genericstable" can be created to list the local users sending mail and the intended replacement address in the form

user1 replaced_user1@changeddomain1.com

user2 replaced_user2@changeddomain2.com

...

Then, the generics database is built by using these commands

cd /etc/mail

makemap hash genericstable < genericstable

chmod a+r genericstable.db

How to apply the change to the envelope as well

The mail contains the sender address in two different instances: in the "mail header" being the information the mail frontend presents to the receiver, and in the "envelope" being used in the SMTP dialog. By default either form of masquerading is applied only to the "mail header". If it is wanted to apply it to the "envelope" as well (which might be a requirement for some mail relays), the following statement

FEATURE(masquerade_envelope)dnl

can be added (either after the "MASQUERADE_AS" or the "FEATURE(genericstable)" line) to the respective submit-???.mc file when the submit.cf file is built. 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值