NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: combining /var/mail files
steve%prd.co.uk@localhost wrote in <20180823174137.6B0EF4639B%monroe.prd.co.uk@localhost>:
|During a change of ISPs this week, I had to run mail service on a
|remote VPS, and access emails there. There must be gotchas if I
|simply append the mail files from the VPS to the existing
|corresponding files on our usual mail machine now it's got it Internet
|connection restored. There are always gotchas. Can someone identify
|them for me?
If MBOX files are used it could happen that "From " lines are
messed up, or that the Mailbox does not end with a newline. For
example, DMA (DragonFly Mail Agent) (can) generate(s) mailboxes
with an invalid (according to RFC 4155 etc.) last message. So, if
the former is not an issue "(cat f1 && echo && cat f2) > newfile"
may be sufficient.
Otherwise you could my BSD Mail clone which also tries to get the
former right -- the POSIX standard and Unix traditional only use
"From xy", whereas the standard RFC 4155 is more strict, and that
can cause misinterpretations by some software.
Long story short, if we see such lines we complain, and for these
cases i have a macro
define mboxfix {
\localopts yes; \wysh set mbox-rfc4155;\
\wysh File "${1}"; \copy * "${2}"
}
(which is devel sauce for
define mboxfix {
localopts yes
set mbox-rfc4155
wysh File "${1}" # or eval File ${1}
copy * "${2}"
})
to be used like "call mboxfix oldfile newfile".
This works with v14.9.11, before you had to say
eval copy * "$2"
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
Home |
Main Index |
Thread Index |
Old Index