?
Solved

Securing sending postfix e-mail

Posted on 2004-04-12
3
Medium Priority
?
208 Views
Last Modified: 2010-05-18
I have a redhat 9 server with postfix and dns for "www.mydomain.com".  I have been receiving weird e-mails such as "any_user@mydomain.com", also e-mails with several domains that i suspect are being originated from my own server.

How can i restrict my mail server to accept only outgoing e-mails originated from my lan 192.168.0.0/255.255.255.224 and also for the webmail interface in www.mydomain.com/mail

Thanks a lot !
0
Comment
Question by:diordonez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 10809270
I suspect that you are confused as to the real source of those emails and that you are taking what's in the From: header too litteraly. The From: header corresponds exactly to what's on the piece of paper inside of an envelope. It can be completely different from the envelope Sender, in the same manner that what's on the paper inside of an envelope isn't seen by the postoffice. The From: header can contain anything, or even be absent and the mail will still be delivered to the envelope Recipient.

To see where the message really came from you need to look at the envelope headers and how that's done depends on what mail client you use. For example with Evolution you select "View->Message Display->Show Full Headers". With that visible the first "Received:" from the bottom is the system that originated the message.
0
 
LVL 2

Expert Comment

by:tcmv
ID: 10810387
If you want to watch this traffic in real time, I suggest getting ethereal (or tethereal -- the text based version for the command line) and use the following filter: "tcp port 25", which will catch all SMTP mail traffic.  Watch this traffic for spoofed mail ... in doing so you may be able to determine also if mail is being relayed from your box or if the offending mail servers are enumerating mail accounts using the VRFY command (it's basically like saying "Is Joe a user on this mail server?").

Make sure the following line is in your postfix config file:

disable_vrfy_command = yes

-tcmv
www.mvix.net
0
 
LVL 12

Accepted Solution

by:
mburdick earned 375 total points
ID: 10819819
If you are using the machine to only send e-mail, and not receive, you have two choices:

1) Install / run / modify IPTABLES to block connections to port 25 from anywhere but the addresses you specifiy.

2) Modify the mynetworks parameter of postfix (/etc/postfix/main.cf) to reflect only your local subnet addresses and 127.0.0.1/32. If you do this, you will also need to modify the mydestination paramer and set it to something bogus (or leave it blank).
0

Featured Post

DFW AZURE MEETUP TONIGHT FRI 6PM

We will be discussing what Azure Stack is, how does it fit into the suit of offerings that Azure has currently, and where can it fit into your organizations technology stack. We will also be discussing limitations of the platform while covering various applicable scenarios.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question