Denis Kanchev | 21 Jul 08:52 2014
Picon

Interesting bug - failed to match after adding headers in maildrop

Hi all,

I've found a bug, where mail drop cant match the mail headers ( version 2.7.1 ) .
The mail headers are in this order
Received:
Received:
Message-ID:
Date:
From:
User-Agent:
To:
Subject:
Content-Type:
Content-Transfer-Encoding:


Then i run mail drop with -A option ( to add headers )
  maildrop -A "Return-Path: admin <at> something.com" -A "Delivered-To: admin <at> something.com"
And if i turn on the debug - then i see that the last headers are cut and subject is only partial ( or missing ) and the pattern can't match the subject . And there is the proof:

We have a subject like this "Subject: =?UTF-8?B?0YLQtdGB0YI=?=" ( decoded is тест ) and filter /^subject:.*тест.*/ , then we run maildrop with -V 4 ( for debug ) and here is the output

Matching /^subject:.*тест.*nst
/ against Subject: =?UTF-8?B?0YLQtdGB0

Then i cut added headers with 3 symbols ( they become something like this maildrop -A "Return-Path: admin <at> something.com" -A "Delivered-To: admin <at> someth.com" ) and we repeat the test
Matching /^subject:.*тест.*nst
/ against Subject: =?UTF-8?B?0YLQtdGB0YI=

Nice - the subject is 3 symbols longer :) , then lets cut more symbols from the headers in the options, then we remove 3 more symbols from the options and finally maildrop matched the pattern

Matching /^subject:.*тест.*nst
/ against Subject: тест

I found a solution for this ( and keeping added headers )
Just add
xfilter "cat"
and xfilter will read the message again ( and all headers )

Regards,
Denis Kanchev
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
Harry Duncan | 16 Jul 11:46 2014
Picon

restricted access email system

Hi Guys,

Wondering if anyone has any thoughts / ideas on how to provide
restricted external access to email.

Have a customer who want to move their email server in house, internal
access only, and then provide restricted external access to a select
few to access by iphone etc. It would be imap access and/or webmail.

Two solutions come to mind, one is vpn, the other is proxy with access
control. Perhaps I am missing something cool that is already built
into courier or a better solution.

Just wondering if anyone has any thoughts?

Harry.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Roger Schreiter | 5 Jul 02:40 2014
Picon

Bug in courier-authlib-0.66.1.20140701?

Hello,

I upgraded my courier installation from an 0.5 version
to the up to date version.

After upgrading I had problems logging in using authlib with module
authmysql, however it is imho no problem of the mysql module.

authlib connected to the mySQL-Server correctly, got the data
and then hung, consuming 100% of CPU time.

Imho there is a endless loop in checkpassword.c (in authlib).
Please check my diff file!

Regards,
Roger.

*** checkpassword.c_orig        2014-07-05 02:20:34.724457072 +0200
--- checkpassword.c     2014-07-05 02:21:17.770077223 +0200
***************
*** 29,37 ****
  static int safe_strcmp(const char *a, const char *nullable_b)
  {
        if (!nullable_b)
                return -1;
!       return safe_strcmp(a, nullable_b);
  }

  static int do_authcheckpassword(const char *password, const char
*encrypted_password)
  {
--- 29,37 ----
  static int safe_strcmp(const char *a, const char *nullable_b)
  {
        if (!nullable_b)
                return -1;
!       return strcmp(a, nullable_b);
  }

  static int do_authcheckpassword(const char *password, const char
*encrypted_password)
  {

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Alexey Mishustin | 29 Jun 16:28 2014
Picon

Perlfilter debugging

Hello,

I'm trying to implement a simple perl-filter script:

diff -u /usr/share/courier/perlfilter-example.pl ./perlfilter-mailerdaemon.pl
--- /usr/share/courier/perlfilter-example.pl    2014-06-22
14:35:24.000000000 +0400
+++ ./perlfilter-mailerdaemon.pl        2014-06-29 18:16:47.000000000 +0400
 <at>  <at>  -17,6 +17,11  <at>  <at> 
 # The number of the filedescriptor that's connected to the socket is
 # passed to us on STDIN.

+my $debug_fh;
+open ($debug_fh, '>', '/tmp/perldebug');
+print $debug_fh "perlfilter script launched!\n";
+close $debug_fh;
+
 my $filedesc=shift  <at> ARGV;

 my $socket=new IO::File "+<&$filedesc";
 <at>  <at>  -77,7 +82,7  <at>  <at> 
                last if $line eq "";    # End of headers

                return "500 Invalid Date header."
-                       if $line =~
/^Date:......................................................................../i;
+                       if $line =~ /^To:.*mailer-daemon.*$/i;
        }

        return "";

But it doesn't work: doesn't reject messages sent to mailer-daemon,
doesn't print into the file /tmp/perldebug. Nothing about perlfilter
in logs (except 'Starting perlfilter').

There is the sole line with the full path to the script in
/etc/courier/filters/perlfilter.

There is the sole line 'esmtp' in /etc/courier/enablefiltering.

I issued `courierfilter start' and `filterctl start perlfilter'.

lsof shows sockets of perlfilter, ps aux shows processes.

How could I debug this?

--

-- 
Regards,
Alex

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Vytautas Kasparavičius | 27 Jun 08:42 2014
Picon

webmail not using defaultdomain

Hello,
Courier version 0.73.1 on FC19
I have correct domain in /etc/courier/defaultdomain but when I login 
into webmail on the right upper corner I still see email address 
composed not with domain(user <at> plasta.lt) but with courier server 
hostname(user <at> mail.plasta.lt). What's wrong?
Thanks.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Joe Laffey | 14 Jun 07:11 2014

IMAP broken with Kindle Mail update

Hi,

I have a use with an Amazon Kindle that just automagically updated its 
email client software.

Now it is not working correctly with IMAP. It seems to be having trouble 
deleting mail, or saving sent mail.

Here is a log excerpt from the debug log:

WRITE: main2 OK LOGIN Ok.
READ: ATOM: main3
READ: ATOM: SELECT
READ: QUOTED_STRING: INBOX
READ: EOL
WRITE: * FLAGS ($FORWARDED \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ($FORWARDED \* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 19 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1113417626] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
main3 OK [READ-WRITE] Ok
READ: ATOM: main4
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27497
READ: QUOTED_STRING: Trash
WRITE: main4 NO Error in IMAP command received by server.
READ: ATOM: main5
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27496
READ: QUOTED_STRING: Trash
WRITE: main5 NO Error in IMAP command received by server.
READ: ATOM: main6
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27495
READ: QUOTED_STRING: Trash
WRITE: main6 NO Error in IMAP command received by server.
READ: ATOM: main7
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27494
READ: QUOTED_STRING: Trash
WRITE: main7 NO Error in IMAP command received by server.
READ: ATOM: main8
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27493
READ: QUOTED_STRING: Trash
WRITE: main8 NO Error in IMAP command received by server.
READ: ATOM: main9
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27492
READ: QUOTED_STRING: Trash
WRITE: main9 NO Error in IMAP command received by server.
READ: ATOM: main10
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27491
READ: QUOTED_STRING: Trash
WRITE: main10 NO Error in IMAP command received by server.
READ: ATOM: main11
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27490
READ: QUOTED_STRING: Trash
WRITE: main11 NO Error in IMAP command received by server.
READ: ATOM: main12
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27498
READ: QUOTED_STRING: Trash
WRITE: main12 NO Error in IMAP command received by server.
READ: ATOM: main13
READ: ATOM: UID
READ: ATOM: COPY
READ: NUMBER: 27499
READ: QUOTED_STRING: Trash
WRITE: * BYE [ALERT] Fatal error: TOO MANY CONSECUTIVE PROTOCOL VIOLATIONS:

Any thoughts? Any one else dealing with this brain dead Kindle update?

I did recreate the IMAP account (deleted it and re-enetered the info). 
That did not help. Other IMAP clients have no problems with the same 
account.

Thanks,

--
Joe Laffey
The Stable
Visual Effects
http://TheStable.tv/?e34597M/

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Joe Laffey | 6 Jun 05:48 2014

Looging of TLS

Hi,

Is there any way to cause courier to log that a connection is using 
TLS/SSL for receiving and sending mail from other mail relays?

Is there a way to have it add a head saying that TLS/SSL was used? When I 
send mail using SMTP AUTH with TLS/SSL then I see a header to this effect, 
but if I just send an email from one TLS capable server to my courier 
server, or from my courier server to another TLS capable server I do not 
see any indication that the connection was encrypted.

This is mainly for debugging/testing purposes (for which I found a very 
useful website http://checktls.com/perl/TestReceiver.pl )

However, it would be nice to have this in the logs, and even nicer to have 
this is a header.

Thanks!

--
Joe Laffey
The Stable
Visual Effects
http://TheStable.tv/?e34475M/

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Sam Varshavchik | 5 Jun 01:39 2014

Re: Using courier as a relay host

Joe Laffey writes:

> On Wed, 4 Jun 2014, Sam Varshavchik wrote:
>
>> Joe Laffey writes:
>>
>>> Any thoughts on why I would get a relaying denied from mail sent through a  
>>> host
>>> that is listed as a RELAYCLIENT ?
>>>
>>> I see:
>>>
>>>  courieresmtpd:
>>> error,relay=::ffff: 
>>> 71.91.xx.yy,from=<joe <at> xxxxx.tv>,to=<gregxxxxxx <at> verizon.net>:
>>> 513 Relaying denied.
>>>
>>>
>>> I know this worked right in my old setup. So I am trying to figure out what  
>>> has
>>> changed.
>>>
>>> Basically, I want that host 71.91.xx.yy to be able to relay any mail it wants
>>> out through the courier machine.
>>
>> The access file's syntax is whitespace-sensitive. Verify that there's  
>> exactly a single tab character between the IP address and "allow".
>>
>
>
> That was it!
>
> Might I suggest either making it more tolerant of whitespace (which I am  
> sure is on your list, but you likely have better things to worry about), or  
> alternately, putting a big note in the comments at the top of the file about  
> the whitespace requirement... I added one to mine.
>
> Thanks again!

Yeah, I should; as soon as I get off my current streak of laziness.

Originally, I didn't really intend for the access file to be manually  
edited; but rather have everyone use a more fleshed out tool that generates  
the access file, and maintains. In that context, whitespace is not an issue.

Like webadmin, for example.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
Joe Laffey | 4 Jun 22:59 2014

Using courier as a relay host

Hi,

I have some email addresses that I need to relay through my courier server from 
another server running postfix.

I have postfix set up to use the courier server as a relay host in postfix's 
transport-map. This worked fine with my older version of courier (recently 
upgraded from a pretty old version).

Now the courier server is complaining relaying denied.

I have this in /etc/courier/smtpaccess/default

71.91.xx.yy   allow,RELAYCLIENT (where xx and yy are numbers)

I ran makesmptaccess, and the date on the .dat file is up to date. I see in the 
esmtpd file that this is the correct place for it (i.e. I did not change the 
location of smptaccess).

Any thoughts on why I would get a relaying denied from mail sent through a host 
that is listed as a RELAYCLIENT ?

I see:

  courieresmtpd: 
error,relay=::ffff:71.91.xx.yy,from=<joe <at> xxxxx.tv>,to=<gregxxxxxx <at> verizon.net>: 
513 Relaying denied.

I know this worked right in my old setup. So I am trying to figure out what has 
changed.

Basically, I want that host 71.91.xx.yy to be able to relay any mail it wants 
out through the courier machine.

Thanks in advance.

--
Joe Laffey
The Stable
Visual Effects
http://TheStable.tv/?e34439M/

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Joe Laffey | 1 Jun 19:32 2014

CRAM-MD5 and pop3d-ssl

Hi,

We recently upgraded our mail server and found that newer versions of 
Courier seem to have trouble with CRAM-MD5 authentication, at least when 
using SSL.

I found this:

http://www.courier-mta.org/imap/INSTALL.html#crammd5

and was able to get CRAM-MD5 to work with IMAP. However it still does not 
want to work with pop3-ssl or esmtp-ssl (for outgoing).

I added  "AUTH=CRAM-MD5" keyword to the IMAP_CAPABILITY environment 
variable. Is there something similar to pop or esmtp?

Any thoughts?

If I have to I can get users to switch to password or plain authentication 
(it is over SSL after all). But I would rather not have to talk everyone 
through that.

--
Joe Laffey
The Stable
Visual Effects
http://TheStable.tv/?e34366M/

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Andrew Burnette | 30 May 20:28 2014
Picon

systemd scripts for courier

Hi all,

currently running on a gentoo derivative distro, courier seems happy for
over a decade.....in remote servers, so swapping out distro not an option.

Anyone have a recommendation or pointer to any distro's
build/rpm/package/etc which includes systemd scripts for courier and
courier-authlib? None in sight in my current setup, but migration to
systemd is required to continue upgrades to OS, etc.

Happy to adjust another distro's systemd files for proper file and
config locations, etc.

Thanks kindly,
Andy

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
courier-users mailing list
courier-users <at> lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Gmane