Don't fear the penguin

Φεβρουαρίου 17, 2010

Forthnet Mail Servers

Κατηγορίες: email — Tags:, , , , , , , , , , , — Sotiris Tsimbonis @ 2:13 μμ

Για όσους ψάχνουν τον “Forthnet Mail Server” και δεν τον βρίσκουν…

smtp, pop3, imap, smtp-auth, plain text, ssl encrypted, alternate ports …
popper, mailgate, mail, mailsrv, smtp-auth …

…μια σελίδα που τα έχει όλα μαζεμένα:

http://stsimb.irc.gr/forthnet-mail-servers/

Φεβρουαρίου 5, 2010

bye bye mbox, hello Maildir

Κατηγορίες: email — Tags: — Sotiris Tsimbonis @ 12:43 πμ

Χρησιμοποιούσαμε Qpopper και mbox για Ν χρόνια (Ν=forever).
Χθες όμως ήταν η τελευταία μέρα.
Σήμερα χρησιμοποιούμε dovecot και Maildir.
Η αλλαγή στο mailbox format δεν έγινε “σ’ένα βράδυ”.
Πήρε περίπου δύο μήνες.

Ηταν όμως το τελευταίο βήμα σε ένα έργο που δούλεψαν πολλοί άνθρωποι τα τελευταία 5 χρόνια.

Thank you all !

Δεκεμβρίου 18, 2009

The 2009 ENISA Anti-Spam Measures Survey Report

Κατηγορίες: email — Tags:, — Sotiris Tsimbonis @ 1:37 μμ

The report of the 2009 ENISA Anti-spam Measures Survey is now available:

In 2009 ENISA launched an Anti-Spam Measures survey, asking e-mail service providers in Europe about the measures they take to combat spam in their networks. This survey provides a view of how the fight against spam has evolved since the last survey two years ago.

The survey aims to determine how e-mail service providers are combating spam on their networks. It helps identifying the state of the fight against spam and helps service providers to learn from their peers throughout Europe. Overall, we hope that this research will aid the industry’s understanding and development of best practices in the fight against spam.

Some of the key findings:

  • less than 5% of all email traffic is delivered to mailboxes;
  • most mail providers not only take care of protecting their customers from receiving spam, they also avoid sending spam to others;
  • fighting spam has reached maturity although continuous adaptation to new techniques is needed.

The survey report with detailed information about the measures is available for download.

Slides of the main survey results.

I would like to publicly congradulate ENISA on the methods they used to conduct this survey.

  • They sent a couple of preparatory emails asking if I would like to participate in such a survey and co-operate with a third party (asking for express permission to share my email address with another organization).
  • The actual survey, hosted on a dedicated site, had very easy to complete registration and clean/direct questions.
  • They sent a nice  “thank you for participating” email.
  • As soon as they processed the answers, they sent a preview of the results to the participants, including personalized answers! The preview report contained the survey’s key results and a custom comparison of my answers with the survey average. I didn’t have t remember my answers, they did it for me!

Well done ENISA people and thank you very much for your work!

Οκτωβρίου 8, 2009

No Subject

Κατηγορίες: email — Sotiris Tsimbonis @ 9:55 πμ

Do you get emails like these?

Date: Thu, 8 Oct 2009 09:41:28 +0300 (EEST)
From: user@domain.gr
To: stsimb@x.gr
Subject: 

Blah blah blah

Do you also get frustrated?
Enough is enough!
No Subject => No Respect

Φεβρουαρίου 9, 2009

dovecot

Κατηγορίες: email — Tags: — Sotiris Tsimbonis @ 11:23 μμ

Ο dovecot είναι ένας πολύ ωραίος mail server (imap/pop3) που “κερδίζει έδαφος”..

Σύμφωνα με ένα mail του tss, η Mailtrust τον προσέλαβε full time για το 2009..

Πάγωσε το πανεπιστήμιο και μετακόμησε στις ΗΠΑ..

Το 2009 θα δούμε πιο γρήγηρο development στο dovecot λοιπόν..

(ref)

Ιανουαρίου 29, 2009

Can I use a purchased list?

Κατηγορίες: email — Tags: — Sotiris Tsimbonis @ 7:15 πμ

Δεκεμβρίου 2, 2008

yahoo.gr relaying denied

Κατηγορίες: email — Tags: — Sotiris Tsimbonis @ 2:57 μμ

Yahoo! has a strange delivery problem lately (last week?) for yahoo.gr recepients..

$ host -t mx yahoo.gr
yahoo.gr mail is handled by 10 mx1.mail.eu.yahoo.com.
yahoo.gr mail is handled by 10 mx2.mail.eu.yahoo.com.

While mx2.mail.eu.yahoo.com accepts mail as expected …

$ telnet mx2.mail.eu.yahoo.com 25
Trying 77.238.177.142...
Connected to mx2.mail.eu.yahoo.com (77.238.177.142).
Escape character is '^]'.
220 mta101.mail.ird.yahoo.com ESMTP YSmtp service ready
helo banana.irc.gr
250 mta101.mail.ird.yahoo.com
mail from:<postmaster@irc.gr>
250 sender <postmaster@irc.gr> ok
rcpt to:<postmaster@yahoo.gr>
250 recipient <postmaster@yahoo.gr> ok
quit
221 mta101.mail.ird.yahoo.com

the other mx, mx1.mail.eu.yahoo.com doesn’t ..

$ telnet mx1.mail.eu.yahoo.com 25
Trying 217.12.11.64...
Connected to mx2.mail.ukl.yahoo.com (217.12.11.64).
Escape character is '^]'.
220 mta161.mail.ukl.yahoo.com ESMTP YSmtp service ready
helo banana.irc.gr
250 mta161.mail.ukl.yahoo.com
mail from:<postmaster@irc.gr>
250 sender <postmaster@irc.gr> ok
rcpt to:<postmaster@yahoo.gr>
550 relaying denied for <postmaster@yahoo.gr>
quit
221 mta161.mail.ukl.yahoo.com
Connection closed by foreign host.

Reported this using their Issues Form as a possible misconfiguration on their side, but no answer yet..

Anyone?

Οκτωβρίου 20, 2008

milter quota for Maildir

Κατηγορίες: email — Tags:, — Sotiris Tsimbonis @ 3:23 μμ

This is a backend cgi that works with Maildir, and complements the previous milter quota posting.

Be careful! This is only a proof-of-concept. It does not do any sort of caching, nor does it use UDP.

Apparently, the standard Maildir++ specification dictates that everyone must update the maildirsize file when doing any operation in Maildirs. So we don’t have to do heavy filesystem operations to get current mailbox size, we can read it from this file..

#!/usr/bin/perl
# This is quota.cgi for Maildir # http://wiki.dovecot.org/Quota/Maildir

use CGI qw(:standard);

$username = param("u");
exit if ($username eq "");

$home = "/var/mail";

$file=$home . "/" . $username . "/Maildir/maildirsize";
open(FILE, "< $file") or die "OK $file does not exist.";
@lines = <FILE>;
close(FILE);

($quota, $msgquota) = split(" ", $lines[0]);
$quota=int($quota); $msgquota=int($msgquota);
$line=0; $size=0; $msgs=0;
do {
 $line++;
 ($msgsize, $msgcount) = split(" ", $lines[$line]);
 $size+=$msgsize; $msgs+=$msgcount;
} while ($line< =$#lines);

if (($size>$quota) || (($msgs>$msgquota) && ($msgquota!=0))) {
    print "OVERQUOTA $username $size $quota $msgs $msgquota\n";
} else {
    print "OK $username $size $quota $msgs $msgquota\n";
}

(Ref)

Αυγούστου 29, 2008

Alpine 2.00 now available

Κατηγορίες: email — Tags: — Sotiris Tsimbonis @ 11:31 πμ

Μετά την απόλυση του Mark Crispin .. βγήκε το Alpine 2.00

Version 2.00 also marks the transition of the Alpine Messaging Team’s role
of direct, active development to one more oriented toward supporting
community driven development. The team intends to continue hosting source,
coordinating and consulting on contributed fixes and additions, and
packaging periodic releases.

(via alpine-announce)

Μαρτίου 26, 2008

ORDB bounces

Κατηγορίες: email — Tags:, — Sotiris Tsimbonis @ 10:42 πμ

Η ordb ήταν μια dnsbl με open relay servers που χρησιμοποιούσαν πολλοί mail servers. Εχει σταματήσει τη λειτουργία της όμως από το Δεκέμβρη του 2006..

Επειδή όμως πολλοί ξεχασμένοι εξακολουθούν να τη χρησιμοποιούν (ενώ πλεον δεν έχει up-to-date data και δεν προσφέρει το επιθυμητό αποτέλεσμα) από χθες 25 Μαρτίου 2008 άρχισε να επιστρέφει false positives σε όλα τα queries προς αυτή.

Για παράδειγμα, μέχρι να αλλάξουν το configuration στους mail servers του in.gr δε δέχονται κανένα mail…

$ telnet mail.in.gr 25
Trying 194.63.247.43...
Connected to mail.in.gr.
Escape character is '^]'.
220 IN_MAIL_SERVER.in.gr ESMTP
helo test.host.gr
250 eml3.in.gr Hello test.host.gr [192.168.1.2], pleased to meet you
mail from:nobody@forthnet.gr
553 5.3.0 Rejected - see http://ordb.org/
quit
221 2.0.0 eml3.in.gr closing connection

(via)

Φεβρουαρίου 11, 2008

milter verify from

Κατηγορίες: email — Tags:, , — Sotiris Tsimbonis @ 12:40 πμ

Μετά το milter-quota, ένα ακόμα milter βασισμένο στο sample.pl του Sendmail::Milter. Χρειάζεται και το Net::LDAP.

Υποθέτει ότι έχουμε έναν authoritative LDAP με όλα τα emails για τα domains που είναι υπεύθυνος ο mail server μας. Αν κάποιος πάει να μας στείλει mail με envelope from address (από δικό μας domain) που όμως δεν υπάρχει στον LDAP, το κάνουμε REJECT. Ετσι γλιτώνουμε το spam και backscatter από πολλά malware που στέλνουν κάνοντας randomize το from address και κολάνε το domain στο τέλος..


use Net::LDAP;

sub envfrom_callback
{
        my $ctx = shift;
        my @args = @_;

        $email=@args[0]; # format is <user @dom.ain>
        $email =~ s/< (.*)>/$1/; # strip <>
        ($username, $domain) = split (/@/, $email);
        #print "username=$username domain=$domain\n";

        $ldap = Net::LDAP->new("ldapserver");
        $ldap->bind("cn=postmaster,ou=sendmail,dc=mail", password=>"xxxx");
        $mesg = $ldap->search(filter=>"(sendmailMTAClassValue=$domain)",
                 base=>"sendmailMTAClassName=LDAPRoute,ou=classes,ou=sendmail,dc=mail");
        @entries = $mesg->entries;

        if (@entries) { # domain exists in our LDAP
                #print "domain $domain exists in our LDAP, so perform user lookup\n";
                $mesg2 = $ldap->search(filter=>"(mailLocalAddress=$username\@$domain)",
                        base=>"ou=$domain,ou=hosted,dc=mail");
                @entries2 = $mesg2->entries;

                if (@entries2) { # user exists in ldap
                        #print "address $username\@$domain exists in ldap. accept.\n";
                        return SMFIS_CONTINUE;
                } else {
                        #print "address $username\@$domain does not exist in ldap. reject.\n";
                        $ctx->setreply('550', '5.7.1', "Reject: your From address $email does not exist."); #rfc3463
                        return SMFIS_REJECT;
                }
        } else { # domain is not in our LDAP
                #print "domain $domain does not exist in LDAP. accept.\n";
                return SMFIS_CONTINUE;
        }
}

Αλλα παρόμοια milters:

Φεβρουαρίου 10, 2008

milter quota

Κατηγορίες: email — Tags:, — Sotiris Tsimbonis @ 3:31 μμ

Ενα milter για να γλιτώσουμε (κι άλλο) backscatter.

Υποθέτουμε οτι στο mail σύστημά μας έχουμε Frontend και Backend mail servers.

Ενας τυπικός frontend mail server κάνει μία σειρά από ελέγχους, πχ. Reverse DNS Lookups, dnsbl lookups, whitelist/blacklist checks, Level-1 attachment cut-off, Anti-Virus scan κλπ.

Το mail που περνάει επιτυχώς όλα τα παραπάνω, πρέπει να πάει στους backend servers και αφού γραφτεί στο mailbox, να περιμένει τον χρήστη να το διαβάσει. Στην περίπτωση όμως που ο χρήστης υπερβαίνει το quota του, τότε το backend δε θα καταφέρει να γράψει το mail στο mailbox, και θα αναγκαστεί να στείλει ένα NDR bounce message, το οποίο είναι backscatter..

Χρειαζόμαστε ένα μικρό (web)service στο backend, που θα μας λέει αν ένα mailbox είναι στο όριο ή όχι (overquota).

Για παράδειγμα αυτό το cgi script:

#!/usr/bin/perl
# This is /cgi-bin/quota.cgi

use CGI qw(:standard);

$username = param("u");
exit if ($username eq "");

$quota=200*1024*1024; # assume 200MB quota
$home="/var/mail"; # assume mbox format

$size = ( -s "$home/$username" );

print "Content-Type: text/plain\n\n");

if ($size>quota) {
    print "OVERQUOTA $username $size $quota\n";
} else {
    print "OK $username $size $quota\n";
}

Στο frontend εγκαθιστούμε τα perl modules LWP και Sendmail::Milter.

Παίρνουμε το sample.pl από το Sendmail::Milter και το διαμορφώνουμε κατάλληλα:

use LWP::Simple;

sub envrcpt_callback
{
        my $ctx = shift;
        my @args = @_;

        $email=@args[0]; # format is <user @dom.ain>
        $email =~ s/< (.*)>/$1/; # strip <>
        ($username, $domain) = split (/@/, $email);

        $be_response = get("http://$backend/cgi-bin/quota.cgi?u=$username");

        if ($be_response =~ /OVERQUOTA/) {
                #print "$email overquota\n";
                #RCODE 452 Requested action not taken: insufficient system storage (RFC 2821)
                #XCODE 4.2.2 Mailbox full (RFC 3463)
                $ctx->setreply('452', '4.2.2', "Quota exceeded for $email, try again later");
                return SMFIS_TEMPFAIL;
        }
        else {
                #print "$email not overquota\n";
                return SMFIS_CONTINUE;
        }
}

Το mail προς κάποιο overquota mailbox γίνεται tempfail και όχι reject, ώστε αν ο χρήστης αδειάσει το mailbox του να πάρει τα mails αργότερα..

Update: There is now a proof-of-concept cgi script for Maildir.

Ιανουαρίου 21, 2008

inbox-outbox minutes

Κατηγορίες: email — Tags:, — Sotiris Tsimbonis @ 11:55 πμ

Μόλις κυκλοφόρισαν τα πρακτικά του anti-spam workshop που είχα παρακολουθήσει το Νοέμβρη στο Inbox-Outbox.

"The workshop was set up in order to bring technical and non-technical
anti-spam experts together to give an overview about current situation
in the area of anti-spam. Professionals from both sides gave
contributions about spam trends, current legal and technical anti-spam
issues and newest research results.

Discussions during the workshop made clear that providers are fighting
spam, but need support from different areas. In general, support from
legal experts is highly appreciated by providers. They often seem to
stumble in difficult legal aspects regarding email or virus filtering.
This workshop made clear which measures are actually desirable and
required by policy makers. Moreover, providers welcomed the efforts from
research institutes developing new anti-spam technologies.

All in all, the results of the workshop and ENISA's upcoming deliverable
on provider security measures give a comprehensive overview about
current anti-spam best practice. However, during the workshop it raised
up that spam should be considered as a symptom of network abuse. Solving
spam therefore requires, next to current efforts, also approaches to
mitigate net abuse in general. As a consequence, ENISA will concentrate
next year on resilience as a main part of its Working Programme 2008 and
put forth efforts making network abuse more transparent to legal and
technical experts."

Thanks Pascal ;)

Δεκεμβρίου 31, 2007

mail proxy

Κατηγορίες: email — Tags:, — Sotiris Tsimbonis @ 1:18 μμ

Επίσης σήμερα ανακάλυψα ότι εκτός από το perdition υπάρχει και ένας ακόμη mail proxy, ο nginx..

Σύμφωνα με το FastMail.FM Weblog έμειναν ευχαριστημένοι απο την αλλαγή..

Το perdition μπορεί να κάνει απ’ευθείας LDAP lookups, αλλά στο nginx μάλλον πρέπει να γίνει με php όπως φαίνεται στο recipe που δίνουν..

Δεκεμβρίου 30, 2007

Οταν το πρόβλημα του mail είναι πρόβλημα DNS

Κατηγορίες: DNS, email — Tags:, — Sotiris Tsimbonis @ 4:20 μμ

Τηλέφωνο πρωί πρωί από ένα φίλο (λες και μ’έβλεπε στον ύπνο του):

- Σε παρακαλώ, βοήθησέ μας γιατί έχουμε μιλήσει με 5 διαφορετικά άτομα για ένα πρόβλημα με τα email μας και όλοι μας λένε ότι να ‘ναι..

Ο ένας μας λέει ότι του απαντάει μια IP 205.κάτι και όχι μια 62.κάτι.άλλο όπως θα έπρεπε…

Ο άλλος μας λέει ότι όλα είναι OK!

Ο άλλος μας λέει να πάρουμε στον τάδε…

Help!

- Ποιό είναι το domain είπαμε;

- xyz-hotel.com και όταν στέλνουμε mail στο info@xyz-hotel.com παίρνουμε πίσω ένα ακαταλαβίστικο error από έναν mailer-daem…

Βήμα 1:
stsimb$ dig ns xyz-hotel.com @resolver1.opendns.com [1]
;; ANSWER SECTION:
xyz-hotel.com. 172800 IN NS ns1.pendingrenewaldeletion.com.
xyz-hotel.com. 172800 IN NS ns2.pendingrenewaldeletion.com.

- Δεν έχει πληρώσει για το domain του.. Να πάρει τηλ τον καταχωρητή του και όταν γυρίσει πάλι στους σωστούς NS όλα θα δουλέψουν automagically.

Δε χρειάστηκε καν να φτάσω στο βήμα 2 και να δω το μήνυμα λάθους του email…

Γιατί ποτέ κανείς δεν κοιτάει τα βασικά;

[1] Είναι απαραίτητο να ρωτήσεις κάποιον ΑΛΛΟ dns server και όχι τον δικό σου, που πιθανώς να έχει μια τοπική πραγματικότητα για το domain…

Παλιότερα άρθρα »

Blog στο WordPress.com.