imapfoo - attach random, generated or prepared messages to an imap folder
imapfoo <lots of options>
use --help for short and --man for detailed documentation.
imapfoo enables you to quickly attach message to an imap folder. It was mostly used to test different imap implementations.
Attach MD5 checksum files of all attached files.
Attach file to all emails. See --attach-mime for additional options.
Specify mime type for --attach-file. Defaults to binary.
Attach a file generated with either up to m or from l to h digits.
Load config from file. Please note, options specified in the file override options passwd on the commandline.
You can find an example config file in the examples folder
Create imap folder if missing. Without this option, imapfoo will exit with an error message if the specified folder does not exist.
Enable debug output.
Specify type of encryption to use. Can either be ssl or tls. Defaults to ssl.
Print a brief help message and exits.
Connect to host.
Outputs detailed documentation formatted as HTML, see --man.
Append messages to imap folder, defaults to INBOX.
Use login as username when logging in.
When generating lorem ipsum mails, do not generate lines longer than columns. Defaults to 72.
Use file to generate Markov Chains used for lorem ipsum creation. Defaults to lorem.txt.
Set Marlkov Chain prefix to len. Defaults to 3.
Generate lorem ipsums containing count words. Defaults to 100.
Calculate MD5 checksum for every mail, and include it as X-Imapfoo-Md5 header.
Use from for From: mail header. Defaults to root@localhost.
Use subject for Subject: mail header. Defaults to A test mail.
Generate Subject: mail header from current timestamp.
Use to for To: mail header. Defaults to somebody@localhost.
Prints the manual page and exits.
Use file as mbox input.
Specify mode to operate in. Defaults to random.
Read password from .netrc. Needs --host to identify machine. You can optionally pass --login to specify a certain login (defaults to first login found),
Generate amount emails. Defaults to 2.
If used in mbox mode, passing 0 will attach all mails contained in the file.
Read password from file. If file is -. read from STDIN.
Connect to port.
When generating random emails, generate number lines of random text per mail. Defaults to 10.
Use text as the body for simple mails.
Do not connect to imap server and do not send mails. Instead mails will be logged with level debug, see --debug.
imapfoo can be operated in 4 different modes: lorem, mbox, random and simple. Below are examples for those modes.
Please note, examples may be broken in multiple lines, to run them, you will need to enter them on one single line.
When running in check mode, imapfoo will look for the header X-Imapfoo-Md5 in all the folder's messages. It will then strip the message of that header, recalculate the md5 sum and compare it to the stored one. This allows you to check that the message was not damaged after attaching.
imapfoo --login foo --host localhost -n 1 --mc
imapfoo --login foo --host localhost -m check
In lorem mode, imapfoo will generate mails with a lorem ipsum body. For that it does need an input file, to generate random text from. You can use any textfile you like.
imapfoo --login foo --host localhost -m lorem -n 10
imapfoo --login foo --host localhost -m lorem -n 10 --lf foo.txt
imapfoo --login foo --host localhost -m lorem -n 2 --lw 1000 --lc 50 --ms foo!
In mbox mode, imapfoo will read mails from an mbox file and attach them to the folder. You can create mbox files with for example mutt.
imapfoo --login foo --host localhost -m mbox -n 5 --mf mbox
Random mails contain a number of lines of generated hexadecimal content.
imapfoo --login foo --host localhost -m random -n 2 --rl 2
imapfoo --login foo --host localhost -m random -n 2 --rl 2 --mf foo@here --md
When using mode simple, imapfoo will create mails from passed parameters.
imapfoo --login foo --host localhost -m simple -n 1 --mf me@here --mt you@there --md --sb "boring mail body"
imapfoo --login foo --host localhost -m simple -n 1 --mf me@here --mt you@there --md --sb "boring mail body" --af bar.gz --am application/gzip
imapfoo --login foo --host localhost -m simple -n 1 --mf me@here --mt you@there --md --sb "boring mail body" --ar 100-200
Only plain auth is currently supported.
imapfoo currently only supports encrypted imap connections.
This option currently does NOT work with mbox mode.
GPL v2
(c) 2010 bd@bc-bd.org