IMAPBIN

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
SEE ALSO
AUTHORS
BUG REPORTS
COPYRIGHT

NAME

imapbin - upload binary files tp IMAP mailbox

SYNOPSIS

imapbin [-nV?] [-a HEADER:VALUE] [-F EMAIL] [-m MAGICFILES] [-s TEXT] [-t EMAIL] [--append=HEADER:VALUE] [--debug-level=LEVEL] [--debug-line-info] [--dry-run] [--from=EMAIL] [--help] [--magic=MAGICFILES] [--show-config-options] [--subject=TEXT] [--to=EMAIL] [--usage] [--version] URL FILE [FILE...]

DESCRIPTION

Encodes files into a MIME message and uploads it to IMAP mailbox at given URL. MIME type of each file is determined using the file command’s magic(5) pattern file. Alternative pattern files can be given via the --magic option. If the MIME type cannot be determined, application/octet-stream is assumed.

The URL must be one of the following:

imap://[USER[:PASS]@]HOST[:PORT][;notls]
imaps://
[USER[:PASS]@]HOST[:PORT]

where HOST is the host name or IP address of the IMAP server, optional PORT is the port number to use (defaults to 443 for imap://, and 993 for imaps://), optional USER and PASS supply login credentials. The ;notls attribute can be used with imap:// scheme to disable STARTTLS.

If not supplied, credentials are looked up in the mailutils ticket file. If not found there, the user will be prompted to supply his username and password.

Following headers are set by default in the composed message:

From:

Set to email address deduced from the current user name and the name of the host.

To:

Set to empty value.

Subject:

Set as follows:
Upload of
FILE

if given one FILE argument,

Upload of FILE1 and FILE2

if given two arguments, and

Upload of FILE and N other files

if given more than two arguments. Here, N is number of arguments minus one.

These defaults can be changed using command line options.

OPTIONS

-a, --append=HEADER:VALUE

Append mail header to the message being constructed. Quote the argument properly, if it contains characters that can be interpreted by the shell.

-F, --from=EMAIL

Set email sender address.

-m, --magic=MAGICFILESf

Colon separated list of magic(5) database files to use instead of the default.

-n, --dry-run

Don’t actually submit the message, just print what would have been done.

-s, --subject=TEXT

Set subject line.

-t, --to=EMAIL

Set recipient address.

Global debugging settings
--debug-level=
LEVEL

Set Mailutils debugging level. Use --debug-level=mailbox.trace1, for a general overview of uploading operations, and --debug-level=mailbox.prot, for a detailed IMAP protocol transcript.

--debug-line-info

Show source info with debugging messages.

Informational options
--show-config-options

Show mailutils compilation options.

-?, --help

Print a short help summary.

--usage

Print a short command line usage summary.

-V, --version

Print program version and copyright information.

EXIT STATUS

0

Success.

1

Failure.

2

Command line usage error.

SEE ALSO

GNU Mailutils Manual, section 2.2, Remote Mailboxes

Available online at: <https://mailutils.org/manual/html_section/Remote-Mailboxes.html>

GNU Mailutils Manual, section 3.3, Debugging

Available online at: <https://mailutils.org/manual/html_section/debugging.html>

Mailutils ticket file

<https://mailutils.org/wiki/Fetching_Mail_with_Movemail#Mailutils_Ticket_File>

magic(5)

AUTHORS

Sergey Poznyakoff

BUG REPORTS

Report bugs to <gray@gnu.org>.

COPYRIGHT

Copyright © 2021, 2025 Sergey Poznyakoff
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


Manpage server at man.gnu.org.ua.

Powered by mansrv 1.1