[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

"securing" postfix (was Re: Did I send that? (reading postfix logs))



[sorry this reply is so late, I only noticed your message just now]

On Tue, Sep 02, 2003 at 04:35:28PM -0400, Emma Jane Hogbin wrote:
| On Tue, Sep 02, 2003 at 04:03:53PM -0400, Derrick 'dman' Hudson wrote:
| > On Fri, Aug 29, 2003 at 04:30:44PM -0400, Emma Jane Hogbin wrote:
| > 
| > | I've just set relay_domains = $mydestination according to:
| > 
| > That is VERY wrong.  If a domain is hosted locally then you don't
| > relay for it.  If you relay for it then it isn't hosted locally.  No
| > domain should be listed in both paramters.
| 
| Your email gets a big "0" for usefulness, sorry.

I'm sorry.  When I first looked at this thread I noticed the above
noted error right off, but didn't have any immediate ideas on the
rest.

Backing up a bit, do you know what the mydestination and relay_domains
parameters are for?  If not then I'll explain them in more depth.

| Do you have suggestions on how I'm supposed to configure Postfix so
| that people stop sending their spam through my laptop?

I think the following document is a good, succint, list of effective
anti-spam measures.  Jim also includes some warnings about potential
pitfalls associated with the techniques.
    http://jimsun.linxnet.com/misc/postfix-anti-UCE.txt

That document is intended for mail servers, but since you are talking
about a laptop it may be even simpler for you.

Going back to what you (Emma) originally posted, I want a better
understanding of your environment.  You said :
    relayhost = relayhost=[127.0.0.1]:8025
What daemon is listening on port 8025 and what purpose does it have?

Your orginal message included this log snippet :
    Aug 29 13:53:51 debian postfix/smtp[3562]: 07C353A654: to=<glang_kg@tlab.ch>, relay=127.0.0.1[127.0.0.1], delay=1, status=sent (250 Ok: queued as 4DF482625C)

The reason the line has "relay=127.0.0.1[127.0.0.1]" is because the
relayhost parameter tells postfix to send all mail via smtp to another
system (which could be a different program, on a different machine).
Since your relay host is 127.0.0.1, postfix relays to something on
your machine.

If you want to know where the message came from, then you need to
search the log for message id 07C353A654.  Somewhere earlier in the
log postfix tells where/how it received the message and gives some
more details of how it handled it.


If on your laptop you never receive mail (via smtp) from the outside
world then you can simply tell smtpd (the incoming smtp daemon portion
of postfix) not to listen on any external interfaces.  If you never
submit mail to postfix via smtp (even from localhost) then you can
simply not start the smtpd process.  Then anyone trying to relay
through the laptop would need to find a different entry point that
gives them access to /usr/sbin/sendmail (for example a broken CGI
script on the web server).

To make smtpd listen on localhost only, edit the master.cf line for
smtpd so it starts with
    localhost:smtp
for example, on my system the entire line would look like
    localhost:smtp      inet  n       -       n       -       -       smtpd
(you may have some different flags set so your line might be somewhat
different from that)

To not run smtpd at all simply comment out the smtpd line.

Note: do _not_ comment out the 'smtp' line (no 'd') or else you won't
be able to send mail out.

I hope this helps you some more!

-D

PS. I did intentionally Cc you so as to avoid the possibility that
    you'll miss this old thread as I did.

-- 
"GUIs normally make it simple to accomplish simple actions and
impossible to accomplish complex actions."
    --Doug Gwyn  (22/Jun/91 in comp.unix.wizards)
 
http://dman13.dyndns.org/~dman/

Attachment: pgp8RJ6jiU4yn.pgp
Description: PGP signature


Reply to: