[courier-users] Migrating old messages

2016-05-11 Thread MK
I've been using courier for 2.5 years on a personal server where I have a few 
accounts that amount to about 20-30 emails a day.  Up until now, I've been 
accessing them via POP but have copies of everything all the way back on the 
server in courier's ARCHIVEDIR.

The POP clients delete stuff from the individual account Maildir's after a 
short period, but a couple of the machines use the same client software and 
keep a syncronized archive of their own.  The others, e.g. my phone, just 
retain messages for a short duration.

I just physically migrated the server, and upgraded courier from 0.66.1 to 
0.76.1 on the new machine.  Everything seems to be working fine.  However, 
rather than continuing with the old methodology just described, I decided to 
switch to IMAP for everything.  I started with fresh, empty, new accounts on 
the new server, with addresses corresponding to the old ones, and there are no 
problems with delivery or access.

But I would like to integrate a backlog of the old messages, for which I have 
the two sources just mentioned:

- A "local" archive from the synchronized POP clients; this has nothing to do 
with courier, although the messages are in separate files and are identical to 
what would be found in the server side Maildirs.

- A "remote" archive in ARCHIVEDIR.

I notice there's a subtle difference between the latter and what ends up in the 
Maildir; the Maildir messages have a "Delivered-To:" and "Return-Path:" header 
added.  In the ARCHIVEDIR, this information seems to be kept in a separate file 
with a 1-1 correspondence to the messages using a format I assume is courier's 
but would be easy to parse if need be.

The issue with simply trying to insert stuff into the Maildir's on the new 
machine is sort of two-fold.  First, they obviously have a name created by 
courier -- I don't know if this is according to a Maildir standard or not, but 
they are different from either the names given to the files by the client 
software in the "local" archive, and the names given to them by courier in the 
ARCHIVEDIR.  If it is according to a documented standard, it would not be hard 
for me to create them from what I have and insert them except for the second 
fold of the problem: courier also tracks them in a separate, per user account 
file.  

For the old POP accounts this is a fairly straightforward looking list.  For 
the new ones, this is a binary database of some sort ('courierimapuiddb').

What are my options here? I believe the message files in ARCHIVEDIR are the 
messages as recieved by courier *almost* unadulterated; there is a "Recieved:" 
header added.  I could strip those off and ask about/figure out a way to feed 
them to courier on the new machine *but* that "Recieved:" header includes a 
date which I'm guessing is the definitive one.

I'm continuing to keep an ARCHIVEDIR on the new machine and it might be handy 
to do something along similar lines later, so I'd prefer to work with that 
stuff than what's in the "local" archive (since I won't be doing that in the 
future). 

Sincerely -- MK


 


--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] pythonfilter

2016-05-11 Thread Jérôme Blion
Hello Gordon,

I read the documentation but I'm not sure about my understanding of some 
sentences.
eg:
attachments
auto_whitelist whitelist_auth whitelist relayclients greylist
clamav
spamassassin

What will happen when whitelist_auth will send a 2xx code ? Which 
filters will be skipped ? The ones defined on the same line or all 
filters defined after it ? In my example, will they be processed by 
clamav and spamassassin or will it stop further filtering ?

Best regards.
Jérôme Blion.

--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] pythonfilter

2016-05-11 Thread Gordon Messmer
On 05/11/2016 02:28 AM, Jérôme Blion wrote:
> eg:
> attachments
> auto_whitelist whitelist_auth whitelist relayclients greylist
> clamav
> spamassassin
>
> What will happen when whitelist_auth will send a 2xx code ?


Multiple words on a single line are only used if the second word is 
"for".  In that case, the words which follow are the names of filters 
that will be bypassed if the filter named by the first word returns a 
2xx code.  Since there is no "for" in the second line of the example, 
the remaining words on that line are ignored.

If you name filters after the "for" keyword, you still have to list them 
on their own line, as was always required.


--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Migrating old messages

2016-05-11 Thread Gordon Messmer
On 05/11/2016 03:46 AM, MK wrote:
> What are my options here?


The one I'd recommend is: Set up the IMAP account on each client.  
Create a folder structure on the IMAP server that matches the client.  
Copy the content of each folder from the old, local folders into the new 
IMAP folders.


--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Migrating old messages

2016-05-11 Thread Alessandro Vesely
On Wed 11/May/2016 18:04:46 +0200 Gordon Messmer wrote:
> On 05/11/2016 03:46 AM, MK wrote:
>> What are my options here?
> 
> 
> The one I'd recommend is: Set up the IMAP account on each client.  
> Create a folder structure on the IMAP server that matches the client.  
> Copy the content of each folder from the old, local folders into the new 
> IMAP folders.

Let me add that those operations --except creating IMAP accounts-- can be done
by users using their clients.  The advantage is that they won't have to delete
spam from already vetted local archives.  And two copies are better than one.
However, if they have slow connections, copying can get lengthy.

If you need to do that on the server, for some reason, you have to parse
archived message's header to learn whether they were incoming or outgoing.  Use
dependable, time-honored parsing functions.  If you used fancy delivery recipes
which changed during the time, you're out of luck.  Otherwise, it should be
straightforward to determine whose .Sent and INBOX folders each message has to
be copied to.  You can try and keep Courier's filenames: Since they embed a
timestamp and an inode number, they are likely to be unique.  See
http://www.courier-mta.org/layout.html

IME it is convenient to subdivide archives by year, for example .Sent,
.Sent.sent-2015, .Sent.sent-2014, ... and similarly for old mail.  YMMV

hth
Ale
-- 

























--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] DNS lookup problem

2016-05-11 Thread Bowie Bailey
On 5/11/2016 4:11 PM, Gordon Messmer wrote:
> On 05/11/2016 12:31 PM, Bowie Bailey wrote:
>> $ testmxlookup westportyachtsales.com
>> westportyachtsales.com: soft error.
>
> Have you checked for errors in your DNS server's logs?

No errors that I can see.

I guess I could use tcpdump to see what is actually happening.

-- 
Bowie

--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] DNS lookup problem

2016-05-11 Thread Sam Varshavchik

Bowie Bailey writes:


$ testmxlookup westportyachtsales.com
Domain westportyachtsales.com:
Relay: mail.westportshipyard.com, Priority: 10, Address:
:::208.91.197.132


There's something wrong with the westportshipyard.com domain.

Its registrar is network solutions.

$ whois westportshipyard.com.
[Querying whois.internic.net]
[Redirected to whois.networksolutions.com]
[Querying whois.networksolutions.com]
[whois.networksolutions.com]


No match for "WESTPORTSHIPYARD.COM.".

And poking whois.internic.net without redirection:

  Domain Name: WESTPORTSHIPYARD.COM
  Registrar: NETWORK SOLUTIONS, LLC.
  Sponsoring Registrar IANA ID: 2
  Whois Server: whois.networksolutions.com
  Referral URL: http://networksolutions.com
  Name Server: NS1.PENDINGRENEWALDELETION.COM
  Name Server: NS2.PENDINGRENEWALDELETION.COM
  Status: clientTransferProhibited  
https://icann.org/epp#clientTransferProhibited

  Updated Date: 24-apr-2016
  Creation Date: 21-apr-1996
  Expiration Date: 22-apr-2017

This domain's name servers look suspicious.

Looks to me like this domain's bill was due last month, and it was not paid,  
and the registrar took ownership of it.





pgpX2iAwVQ3fh.pgp
Description: PGP signature
--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


[courier-users] DNS lookup problem

2016-05-11 Thread Bowie Bailey
I have an outgoing email sitting in my mail queue due to a DNS failure, 
but I can't figure out why it is failing.  When I test it manually, this 
is what I see:

$ testmxlookup westportyachtsales.com
westportyachtsales.com: soft error.

$ dig @172.16.17.201 westportyachtsales.com mx +short
10 mail.westportshipyard.com.

$ dig @172.16.17.201 mail.westportshipyard.com +short
208.91.197.132

$ testmxlookup westportyachtsales.com
Domain westportyachtsales.com:
Relay: mail.westportshipyard.com, Priority: 10, Address: 
:::208.91.197.132

172.16.17.201 is the first DNS server listed in resolv.conf, which is 
what Courier and testmxlookup should be using if I understand 
correctly.  It also works if I query the second DNS sever manually. Now 
that I've gotten a response, testmxlookup will work for a while, but 
eventually it will start giving the soft error again for that domain.  I 
am guessing that this is due to my DNS server caching the result, but 
why would my manual queries succeed and testmxlookup fail the first 
time?  The queries are both coming from the same user on the same machine.

-- 
Bowie

--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] DNS lookup problem

2016-05-11 Thread Gordon Messmer
On 05/11/2016 12:31 PM, Bowie Bailey wrote:
> $ testmxlookup westportyachtsales.com
> westportyachtsales.com: soft error.


Have you checked for errors in your DNS server's logs?


--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users