linux smtp ip伪造,linux – postfix多个IP SMTP横幅

解决方案 – 需要Postfix 2.7或更高版本:

/etc/postfix/master.cf

#smtp inet n - n - - smtpd

127.0.0.1:smtp inet n - n - - smtpd

-o syslog_name=postfix-localhost

-o smtp_helo_name=localhost

-o smtp_bind_address=127.0.0.1

-o myhostname=localhost

65.xxx.xxx.100:smtp inet n - n - - smtpd

-o syslog_name=postfix-mail.abc.com

-o smtp_helo_name=mail.abc.com

-o smtp_bind_address=65.xxx.xxx.100

-o myhostname=mail.abc.com

65.xxx.xxx.200:smtp inet n - n - - smtpd

-o syslog_name=postfix-mail.xyz.com

-o smtp_helo_name=mail.zyx.com

-o smtp_bind_address=65.xxx.xxx.200

-o myhostname=mail.xyz.com

abc-out unix - - n - - smtp

-o smtp_bind_address=65.xxx.xxx.100

-o smtp_helo_name=mail.abc.com

-o syslog_name=postfix-mail.abc.com

xyz-out unix - - n - - smtp

-o smtp_bind_address=65.xxx.xxx.200

-o smtp_helo_name=mail.xyz.com

-o syslog_name=postfix-mail.xyz.com

/etc/postfix/main.cf中

sender_dependent_default_transport_maps = hash:/etc/postfix/sender_transport

/等/后缀/ sender_transport

# Use source IP - 65.xxx.xxx.100

@abc.com abc-out:

@example.com abc-out:

# Use source IP - 65.xxx.xxx.200

@xyz.com xyz-out:

运行命令以生成哈希数据库

postmap hash:/etc/postfix/sender_transport

重新启动/重新加载后缀

service postfix reload

测试

[root@localhost ~]# telnet 65.xxx.xxx.200 25

Trying 65.xxx.xxx.200...

Connected to 65.xxx.xxx.200.

Escape character is '^]'.

220 mail.xyz.com ESMTP Postfix

发送电子邮件测试

[root@localhost ~]# telnet localhost 25

Trying ::1...

telnet: connect to address ::1: Connection refused

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

220 localhost ESMTP Postfix

helo localhost

250 localhost

mail from: spatel@xyz.com

250 2.1.0 Ok

rcpt to: spatel@gmail.com

250 2.1.5 Ok

data

354 End data with .

Hello world!

.

250 2.0.0 Ok: queued as 93E708207BA

得到gmail收件箱>显示原始

Delivered-To: spatel@gmail.com

Received: by 10.xxx.xxx.xxx with SMTP id w64csp782609qgd;

Tue,9 Dec 2014 09:35:57 -0800 (PST)

X-Received: by 10.xxx.xxx.xxx with SMTP id o28mr4132552yha.168.1418146557180;

Tue,09 Dec 2014 09:35:57 -0800 (PST)

Return-Path:

Received: from mail.xyz.com ([65.xxx.xxx.200])

by mx.google.com with ESMTPS id n10si743294ykc.114.2014.12.09.09.35.56

for

(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);

Tue,09 Dec 2014 09:35:56 -0800 (PST)

...

...

Message-Id: <20141209173720.93E708207BA@localhost.localdomain>

Date: Tue,9 Dec 2014 12:37:11 -0500 (EST)

From: spatel@xyz.com

Hello world!

瞧!看到它使用65.xxx.xxx.200 IP地址发送电子邮件..

Received: from mail.xyz.com ([65.xxx.xxx.200])

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值