Connect
Make sure the mutt you have installed has SASL compiled. SASL is necessary for sending outgoing mail. On OpenBSD 6.9, mutt-2.0.6v3-gpgme-sasl will work.
%25define=note block bgcolor=lightblue color=black margin-right=5em margin-left=5em padding=1em overflow=auto %25
%25note%25NOTE: In openbsd7.2, install mutt-2.2.7v3-gpgme-sasl
In ~/.muttrc:
set hostname=ircnow.org
set beep_new=yes
set timeout=300
set imap_user=user123@ircnow.org
set imap_pass="pass123"
set folder=imap://$imap_user@imap.ircnow.org
set spoolfile=+INBOX
set imap_check_subscribed
set header_cache=~/.cache/mutt
set message_cachedir="~/.cache/mutt"
unset imap_passive
set imap_keepalive=300
set mail_check=120
set record=+Sent
set my_pass="pass123"
set my_user='user123@ircnow.org'
set realname='user123'
set from=user123@ircnow.org
set use_from=yes
set smtp_url=smtp://$my_user:$my_pass@ircnow.org:587
set ssl_force_tls=yes
set ssl_starttls=yes
If you'd like to add GPG support, add this line:
source ~/.gpg.rc
Then, in ~/.gpg.rc:
set pgp_decode_command="gpg %25?p?--passphrase-fd 0? --no-verbose --batch --output - %25f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %25s %25f"
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %25f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %25?a?-u %25a? %25f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %25?a?-u %25a? %25f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x4A56DB2DBF8DC186 -- -r %25r -- %25f"
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %25?a?-u %25a? --armor --always-trust --encrypt-to 0x4A56DB2DBF8DC186 -- -r %25r -- %25f"
set pgp_import_command="gpg --no-verbose --import -v %25f"
set pgp_export_command="gpg --no-verbose --export --armor %25r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %25r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %25r"
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %25r"
set pgp_autosign=yes
set pgp_sign_as=0x4A56DB2DBF8DC186
set pgp_replyencrypt=yes
set pgp_timeout=1800
set pgp_good_sign="^gpg: Good signature from"
set pgp_use_gpg_agent="yes"
You'll want to replace 0x4A56DB2DBF8DC186 with your key ID.
See Also
https://www.gnupg.org/documentation/howtos.html
http://codesorcery.net/old/mutt/
http://www.mutt.org/doc/manual/