asmailrc(5)
π asmailrc(5) π
okay bestie, gather round, because we're about to read asmailrc(5) β the resource file for asmail(1). yes it's a file formats manual page. yes it's long. no we are not skimming. π
β¨ NAME β¨
asmailrc β the asmail resource file. that's it. that's the name. iconic.
β¨ SYNOPSIS β¨
$HOME/.asmailrc
β¨ DESCRIPTION β¨
so asmailrc is a resource file and it describes the configuration of the asmail(1) program. that's literally its whole job. it holds the settings, it tells asmail how to act, and asmail listens. main character energy fr. π
πΈ RESOURCE FILE SYNTAX πΈ
the syntax is all about grouping relevant options with {} (curly braces, you know the ones). the keyword sitting right before the opening brace tells asmail what that section is about. and here's the tea: the keywords in one section might be invalid or might have different semantics in another section. so don't just copy-paste a keyword into a random block and expect it to behave. π
all keywords are case-insensitive, so "mailbox" and "Mailbox" are giving the exact same thing, no difference, no drama. BUT β and this is important β the values you give for file names, user names, and so on are case-sensitive, as is usual on Unix systems. okay? okay. π
comments start with # (hash sign) and run until the end of the line. comments and blank lines are just ignored, they're not part of the vibe check.
there are two main sections within the resource file. each of them may be completely omitted, and other sections and settings may be omitted too. asmail will try to use default values for everything you do not specify. it's very forgiving like that. π«Ά
the later values overwrite earlier values. it is perfectly acceptable to specify any option twice and the last value will be used. one exception from this is the animate{} section, where pixmap files are added to the list by multiple occurences of the keywords. so like, that one stacks instead of replacing. noted. π
section name must be followed by { (opening brace) on the same line. the end of a section is signalled by } (closing brace) alone on a line. do not fight this, it's just how it is.
x11β the top-level section describing the GUI settings.mailboxβ the top-level section describing the mailboxes to be monitored.statβ the section may appear within thex11{}section. this section describes what statistics should be shown on the screen.animateβ the section may appear within thex11{}section. this section describes the pixmaps that will be used instead of the default ones and the settings for the animation.
π x11 section π
the x11 section specifies how the application looks on the screen. there may be multiple x11{} sections β the settings from all of them are merged, and later settings overwrite earlier settings. so you can absolutely stack them and let the last one win. slay.
beep [yes|no]β whenbeepis on, the tool will signal arrival of new e-mail by the system beep via the system speaker. π Default isyes.shape [yes|no]β specifies whether the Shape extensions of X11 will be used for drawing the pixmaps that are specified byframe,nomail,oldandnewkeywords in the settings file. when the Shape extensions are used, the tool will use the transparency settings of the pixmaps. that is, when a pixmap contains transparent pixels, those pixels will become actually transparent on the screen. with the Shape extensions disabled, the transparent pixels will show up filled with the background color.
ngl the Shape extension is rather expensive on the CPU power and may slow down things a lot on a slow machine. consider yourself warned bestie π
Default is no.
on_mouse_left comand &β the command will be executed when the application window is clicked with the left mouse button. Default isnone.on_mouse_middle comand &β same ason_mouse_leftfor the middle mouse button.on_mouse_right comand &β same ason_mouse_leftfor the right mouse button.on_new_mail command &β the command will be executed once for each mailbox when the e-mail arrives to that mailbox. Default isnone.
π mailbox section π
the resource file should contain as many mailbox{} sections as the number of mailboxes you want to monitor. each section will create a separate monitor for the given mailbox. one section, one monitor, that's the deal. π
type [ mbox | maildir | mh | pop3 | imap ]β the type of the mailbox.mboxis the standard UNIX mailbox file.maildiris the newer Maildir format.mhis the mH mail directory format.pop3is for the mailboxes on POP3 servers.imapis a mailbox on the IMAP server. depending on the type of the mailbox, some settings may take effect while others will be silently ignored. so if a setting is doing nothing, this is probably why. π
the following keywords are useful for the mbox:
file update unread-is-new
the following keywords are useful for the maildir:
file update
the following keywords are useful for the mh:
file update unread-is-new use-mh-sequences
the following keywords are useful for the pop3:
update auth server user password timeout
the following keywords are useful for the imap:
update server user password mailbox ssl trustedCaDir timeout
persistent
file file-nameβ formbox,mhandmaildir, specifies the location of the mailbox in the filesystem. Default:none.
note: if no mailbox section is present in the configuration file or no configuration file is found, the value of the environment variable $MAIL will be used as the location of the UNIX mailbox format mail file.
update periodβ specifies the period between two updates of this mailbox. the mailbox will be updatedperiodseconds after the previous update is finished. β° Default:10.unread-is-new [ yes | no ]β formboxandmh, specifies whether the messages which are flagged as unread are counted as new messages. Default:no.use-mh-sequences [ yes | no ]β formh, specifies whether asmail should parse the.mh_sequencesfile in this mH mail directory to count new messages. if this option is set to"no", then asmail will parse every message in the mH directory searching for"Status"headers. Default:no.auth plain md5β specifies the type of authentication allowed for the POP3 service.plainstands for the cleartext password authentication,md5stands for the APOP authentication using MD5 hashes. you can specify either of them or both. if both are allowed and the server supports APOP, first APOP will be tried. Default:plain md5.server server-nameβ the server name to connect to. Default:none.user user-nameβ your user name on the server. Default:none.password your-passwordβ your password on the server. Default:none.mailbox mailbox-nameβ your mailbox on the server. this is only useful with IMAP servers, you can specify an alternative to the standard"INBOX"value. Default:INBOXfor IMAP,nonefor the rest.timeout server-timeoutβ the connection to the server will time out afterserver-timeoutseconds waiting for the answer. Default:60.ssl [ yes | no ]β use an encrypted connection to the IMAP server. π Default:no.trustedCaDir directoryβ a directory that contains trusted certificate authorities. this is used to verify a server's certificate when negotiating an encrypted connection. Default:none.persistent [ yes | no ]β the connection to the server can be either opened once and kept open, or the connection can be opened and closed every time we need to check for the e-mail status, i.e. everyupdate periodseconds. if you do not want the connection set-up and login procedure to execute every time, set this toyes. Default:no.
π¦ stat section π¦
this section relates to the representation on the screen of mailbox status and counters. there are the following elements in this representation:
- mailbox state β a letter
Rappears whenever the mailbox is being updated. - error state β a letter appears that shows the error state of the mailbox. the letters may be folowing:
Lβ login procedure failedTβ timeout while waiting for server responseCβ connection problemFβ general fault indication
when an error is indicated, asmail prints a descriptive message on the standard output.
- number of messages β the number of messages is represented by two numbers, for the number of new messages and the total number of messages.
the statistics may be displayed for each of the mailboxes separately as well as for the total of all mailboxes. when the total is displayed, the indicators of the mailbox state and the error state will report if any of mailboxes are updated or have errors.
each [ yes | no ]β whether the tool should display a line of statistics for each of the mailboxes separately. Default:no.total [ yes | no ]β whether the tool should display the summary line for the total number of messages in all mailboxes. Default:yes.status [ yes | no ]β whether the status indicator should preceed every line describing the number of messages in a mailbox and the total. Default:yes.old [ yes | no ]β whether the status indicator should display the number of old (read) messages in the mailbox. Default:yes.new [ yes | no ]β whether the status indicator should display the number of new (unread) messages in the mailbox. Default:yes.delimiter charactersβ the characters are used to separate the number of new messages from the number of old messages in the display. Default:"/".x pixelsβ start the status indicator atpixelsoffset horizontally from the top left corner. Default:0.y pixelsβ start the status indicator atpixelsoffset vertically from the top left corner. Default:52.font font-specificationβ use thefont-specificationfor the status indicator. Default:-*-*-medium-r-normal--10-*-*-*-*-*-*-*.color nameβ use the specified color for the status indicator. the color may be a single word or multiple words surrounded by quotes. Default:black.
π¦ animate section π¦
okay so this section is literally the glow-up zone for your applet. You drop a bunch of XPM files in here and asmail cycles through them like it's running a tiny slideshow. There are three states: nomail, old, new. For each state you can add as many XPM files as you want. If there's only one file, asmail won't really cycle through it β it'll just display once, which saves system resources. periodt.
refreshrefresh-rate β the supplied XPM files get cycled through every refresh-rate number of 1/100th of a second. Default:10. πnomailxpm-file β add this xpm-file to the animation of display to represent the state of an empty mailbox. πoldxpm-file β add this xpm-file to the animation of display to represent the state of a mailbox with only read mail. πnewxpm-file β add this xpm-file to the animation of display to represent the state of a mailbox when there is new e-mail in it. π¬framexpm-file β use this xpm-file as the background image. The background image may use transparency. You can specify more than one, but only the first one will be used. You can also specify the keywordnoneinstead of the name of the file to be used for the frame. The result will be no frame at all around the applet window. iconic. β¨
π EXAMPLE π
here's the whole vibe in one config. Copy it, remix it, make it yours bestie:
x11 {
beep no
on_mouse_left aterm -e bash -c pine &
on_new_mail cat /usr/local/share/asmail/sounds/drip.au > /dev/audio
&
shape yes
stat {
each yes
total yes
delimiter " "
x 5
y 2
font -*-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
color black
}
animate {
refresh 10
nomail /usr/local/share/asmail/pixmaps/e-no.xpm
old /usr/local/share/asmail/pixmaps/e0.xpm
new /usr/local/share/asmail/pixmaps/e1.xpm
new /usr/local/share/asmail/pixmaps/e2.xpm
new /usr/local/share/asmail/pixmaps/e3.xpm
new /usr/local/share/asmail/pixmaps/e4.xpm
new /usr/local/share/asmail/pixmaps/e5.xpm
new /usr/local/share/asmail/pixmaps/e6.xpm
new /usr/local/share/asmail/pixmaps/e7.xpm
new /usr/local/share/asmail/pixmaps/e8.xpm
new /usr/local/share/asmail/pixmaps/e9.xpm
new /usr/local/share/asmail/pixmaps/e10.xpm
new /usr/local/share/asmail/pixmaps/e11.xpm
new /usr/local/share/asmail/pixmaps/e12.xpm
new /usr/local/share/asmail/pixmaps/e13.xpm
new /usr/local/share/asmail/pixmaps/e14.xpm
new /usr/local/share/asmail/pixmaps/e15.xpm
new /usr/local/share/asmail/pixmaps/e16.xpm
new /usr/local/share/asmail/pixmaps/e17.xpm
new /usr/local/share/asmail/pixmaps/e18.xpm
new /usr/local/share/asmail/pixmaps/e19.xpm
new /usr/local/share/asmail/pixmaps/e20.xpm
new /usr/local/share/asmail/pixmaps/e21.xpm
new /usr/local/share/asmail/pixmaps/e22.xpm
new /usr/local/share/asmail/pixmaps/e23.xpm
new /usr/local/share/asmail/pixmaps/e24.xpm
new /usr/local/share/asmail/pixmaps/e25.xpm
new /usr/local/share/asmail/pixmaps/e26.xpm
new /usr/local/share/asmail/pixmaps/e27.xpm
new /usr/local/share/asmail/pixmaps/e28.xpm
new /usr/local/share/asmail/pixmaps/e29.xpm
new /usr/local/share/asmail/pixmaps/e30.xpm
}
}
mailbox {
type mbox
file /var/spool/mail/albert
update 5
unread-is-new no
}
mailbox {
type maildir
file /home/albert/MailDir
update 5
}
mailbox {
type mh
file /home/albert/mhmail
update 5
unread-is-new yes
use-mh-sequences yes
}
mailbox {
type pop3
auth plain md5
server example.com
user yourname
password yourpassword
update 120
timeout 30
}
mailbox {
type imap
server example.org
user yourname
password yourpassword
update 60
timeout 30
ssl yes
trustedCaDir /etc/openssl/certs/myCa/
}
π FILES π
~/.asmailrc
π SEE ALSO π
π COPYRIGHTS π
Copyright (c) 2002-2007 Albert Dorofeev <albert@tigr.net>
Distributed under GNU General Public License v2 ; see LICENSE file for more informations.
π AUTHORS π
Albert "Tigr" Dorofeev <albert@tigr.net>
See the README file for credits.
okay bestie that's the whole page π
this one came from the 3rd Berkeley Distribution, dated 09 Apr 2007, and it's the asmailrc(5) manual. slay, go make your mailbox cute ππ¦β¨
π¦ where this page comes from
- debian bookworm: asmail 2.1-5+b1
- debian trixie: asmail 2.1-7+b2
- ubuntu jammy: asmail 2.1-5
- ubuntu noble: asmail 2.1-6
- ubuntu questing: asmail 2.1-7
- ubuntu resolute: asmail 2.1-9 Β· GPL-2.0-or-later
- ubuntu stonking: asmail 2.1-10 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms