Andree Leidenfrost: I really enjoyed reading this...
:
http://www.kroah.com/log/linux/ols_2006_keynote.html
I truly enjoyed reading this, maybe you will, too...
1 They deliberately never released any source code for those metas to try to keep the user community unified at the centralized servers. While I see the reasoning behind the decision, given the problems we’re facing now, it’s clear the XPilot community would be better off with meta server source that is actively being maintained.
2 Admittedly two problems with the +reportMeta option upstream set us up for this problem. First, counterintuitively, +reportMeta disables reporting to the metaserver (following the rule ”+” negates the meaning of an option starting with ”-”). Second, -reportMeta is a stupid default. Most people starting servers are behind firewalls these days, so unless they consciously decide to make their server public, making the corresponding adjustments to their firewall, the option should not be set (not to mention the security implications of making a server public by default).
With SMTP you connect to a server and send two things: envelope and message. The envelope looks like this:
- MTA
- Mail Transport Agent
- MUA
- Mail User Agent
- MDA
- Mail Delivery Agent
- SMTP
- Simple Mail Transfer Protocol
- MX
- Mail eXchange
- POP
- Post Office Protocol
- IMAP
- Internet Message Access Protocol
MAIL FROM: <enrico@enricozini.org> RCPT TO: <rms@fsf.org> RCPT TO: <linus@linux.org>The message looks like this:
From: <enrico@enricozini.org> To: <rms@fsf.org> Cc: <linus@linux.org> Message-ID: <1234567@enricozini.org> Subject: Test mail Hi Richard, this is a test mail. I'm also writing Linus to show how to send to more people. Cheers, EnricoThere is no authentication. There is no encryption. Two usual types of access control:
The DNS is used to find the SMTP server to use to send a message:
- Outbound e-mail is normally only accepted from an internal network
- Inbound e-mail is normally accepted from anywhere
$ host -t MX yahoo.com yahoo.com MX 10 smtp1.yahoo.com yahoo.com MX 20 smtp2.yahoo.com yahoo.com MX 20 smtp3.yahoo.comThe process of sending an E-Mail:
Example of problems with mail handling:
Enrico writes an E-Mail:
From: Enrico Zini <enrico@enricozini.org> To: Richard Stallman <rms@fsf.org> Subject: Hello from Addis Hi Richard, Addis is a wonderful city, even if it rains a lot. Bye, EnricoEnrico's MUA connects to the SMTP server (for example, port 25 of smtp.aau.edu.et):
HELO enricozini.org 200 OK Hello enricozini.org MAIL FROM: <enrico@enricozini.org> 200 OK Mail from enrico@enricozini.org RCPT TO: <rms@fsf.org>Here, the SMTP server performs relay control: "do we relay mail to rms@fsf.org?":A target address could be refused:
- Outbound e-mail is normally only accepted from an internal network
- Inbound e-mail is normally accepted from anywhere
413 ERR I don't relay for rms@fsf.orgIn this case, the destination is not local but the recipient is accepted because I'm inside the local network:200 OK Destination rms@fsf.org DATA 200 OK Please send message body From: Enrico Zini <enrico@enricozini.org> To: Richard Stallman <rms@fsf.org> Subject: Hello from Addis Date: Mon, 17 Jul 2006 09:49:45 +0300 Message-ID: <124372643@enricozini.org> Hi Richard, Addis is a wonderful city, even if it rains a lot. Bye, Enrico . 200 OK Message accepted QUIT 200 OK Bye.The SMTP server needs to find out where to send the message, using the DNS:
$ host -t MX fsf.org fsf.org MX 10 mail.fsf.org fsf.org MX 20 mail.gnu.orgSo the SMTP server tries the first one and connects to port 25 of mail.fsf.org:
HELO smtp.aau.edu.et 200 OK Hello smtp.aau.edu.et MAIL FROM: <enrico@enricozini.org> 200 OK Mail from enrico@enricozini.org RCPT TO: <rms@fsf.org>The destination is accepted because it's for a local user:200 OK Destination rms@fsf.org DATA 200 OK Please send message body From: Enrico Zini <enrico@enricozini.org> To: Richard Stallman <rms@fsf.org> Subject: Hello from Addis Date: Mon, 17 Jul 2006 09:49:45 +0300 Message-ID: <124372643@enricozini.org> Received: by mail.aau.edu.et on Mon, 17 Jul 2006 09:55:53 +0300 from 10.4.15.158 Hi Richard, Addis is a wonderful city, even if it rains a lot. Bye, Enrico . 200 OK Message accepted QUIT 200 OK Bye.Now, mail.fsf.org will invoke a MDA to write the mail in Richard Stallman's mailbox.
RFC-822 is the original standard for E-mail. RFCs are standard Internet documents. Have a look at RFC documents released the 1st of April.
- Accepting inbound connections:
- Malicious input:
- logic errors
- buffer overflows
- DoS (Denial Of Service) attacks
- Connection floods
- Performing outbound connections:
- Programming errors:
- Flooding of connections
- Performing routing:
- Unauthorised relays
- Mail loops
- Writing to the local hard drive:
- Filling up the hard drive
- Writing to the wrong files
- Writing to the local hard drive as root:
- In case of error or attack, any file in the system can potentially be compromised
To test a mail server:
- Mail name: aau.edu.et (name used to publicly identify the mail server)
- Smarthost name: smtp.telecom.net.et (SMTP server that will relay our e-mail)
$ telnet localhost 25 HELO me MAIL FROM: <a@b.c> RCPT TO: <mail@of.a.local.user> DATA hi . QUITBy default, you find locally delivered mail in /var/mail/username. Postfix configuration files:
To rewrite addresses:
- /etc/postfix/master.cf
- configures how all the postfix components run together (man 5 master)
- /etc/postfix/main.cf
- Main postfix configuration (man 5 postconf)
(see file:///usr/share/doc/postfix/html/ADDRESS_REWRITING_README.html) Manipulating the message queue:
In /etc/postfix/main.cf:
canonical_maps = hash:/etc/postfix/canonicalThen in /etc/postfix/canonical you can add the rewrite rules, like:
enrico enrico@enricozini.orgWhen /etc/postfix/canonical is modified you need to regenerate the index:
sudo postmap canonical(same is when you change the alias file: sudo postalias /etc/aliases)
mailq - List the mail queue.Different mail queues in postfix:Example:postqueue - Postfix queue controlmailqExamples:postsuper - Postfix superintendent# Like mailq postqueue -p # Tries to send every message in the queue postqueue -f # Tries to send every message in the queue for that site postqueue -s siteExamples:# Deletes one message sudo postsuper -d 7C4D2EC0F5D # Deletes all messages held in the queue for later delivery sudo postsuper -d ALL deferred
Mail logs are in:
- incoming
- mail who just entered the system
- active
- mail to be delivered
- deferred
- mail to be delivered later because there were problems
- hold
- mail that should not be delivered until released from hold
/var/log/mail.log /var/log/mail.err /var/log/mail.info /var/log/mail.warn
Alternate MDA: procmail: allows to filter mail automatically into different folders. Mail forwarding with ~/.forward: allows to redirect mail to a different address: just put the address you want to send to in the file ~/.forward.
- mbox: single file, mail separated by "From " lines
- maildir: one directory per folder, one file per mail
- mh: similar to maildir, but not really used
apt-get install dovecotConfiguration is in:
/etc/dovecot/dovecot.confThe main thing that is needed is to enable the mail protocols you want:
protocols = imaps
apt-get install munin munin-nodeExample: http://munin.ping.uio.no To compute more statistics:
Monitor system logs: logcheck:
- anteater
- isoqlog
- mailgraph
- sends you mail with abnormal log lines
- It's important to customize what is normal and you do it with regular expressions
spamassassin - Spam filter Spam scanning:
- Postfix gives the mail to clamav that scans it and gives it back if it's clean.
- Strategies for infected mail:
- silently delete it
- refuse the mail and send a notification to the sender
- refuse the mail and send a notification to the receiver
- quarantine the e-mail
- refuse delivery with a SMTP error
- deliver with an extra header that says that it's a virus
- Postfix gives the mail to spamd that scans it and gives it back with some spam information.
- Strategies for spam mail:
- silently delete it
- refuse the mail and send a notification to the sender
- refuse the mail and send a notification to the receiver
- quarantine the e-mail
- refuse delivery with a SMTP error
- deliver with an extra header that says that it's spam
- New techniques:
- greylisting: when you receive a mail from a host you've never seen before, refuse it with a temporary error, and accept it the second time (after some time delay). Spammers normally don't retry, and implementing retry would increase their cost of sending e-mail.
- crossassassin: if more than some amount of your users receive a mail with the same message ID, throw it away. Sending mails with different headers would increase the cost of sending e-mail.
- man man shows all the sections of the manpages
- man 5 postconf shows the postconf manpage in the "configuration file" section
- Normally manpages are referred as manpage(section) (e.g. postconf(5) )
| [0] | "gatekeeper" is an H.323 term and I brought it up in the conversation because I am new to SIP and, well... He said it would be able to connect to a company-internal "thing, like a Cisco router," so this leads me to assume it will be able to connect to any SER out there. Thanks to Mark Brown for bringing this to my attention. |
ACTION=="add", SUBSYSTEM=="pci", ID=="0000:00:1d.2", ENV UDEV_START ==1, OPTIONS="ignore_device"ACTION=="add", DRIVER=="uhci_hcd", RUN+="/bin/echo -n 0000:00:1d.2 > /sys/bus/pci/drivers/uhci_hcd/unbind"ACTION=="add", DRIVER=="uhci_hcd", RUN+="/some/script/containing/the/previous/echo"When I invented the Web, I didn’t have to ask anyone’s permission. Now, hundreds of millions of people are using it freely. I am worried that that is going end in the USA. … Yes, regulation to keep the Internet open is regulation. And mostly, the Internet thrives on lack of regulation. But some basic values have to be preserved. For example, the market system depends on the rule that you can’t photocopy money. Democracy depends on freedom of speech. Freedom of connection, with any application, to any party, is the fundamental social basis of the Internet, and, now, the society based on it.
Next.