#pragma section-numbers off This page contains some examples of how to set up various email clients and mail servers to send mail through the HCoop SMTP server. <> = Emacs = This particular section explains only how to send email using HCoop's mail server with Emacs. Browsing email with most Emacs mail packages is not covered here, and should be less difficult. Please read the ''Sending email'' section of the [[MemberManual/Email]] page before doing what is described here. To send mail through HCoop using Emacs's `smtpmail` you can use the following configuration. {{{ (require 'smtpmail) (setq message-send-mail-function 'smtpmail-send-it smtpmail-smtp-server "mail.hcoop.net" smtpmail-smtp-service 25 smtpmail-starttls-credentials '(("mail.hcoop.net" 25 nil nil)) smtpmail-debug-info t ; optional, but handy in case something goes wrong smtpmail-auth-supported '(plain)) }}} Put your authentication information into `~/.authinfo` which is in the netrc(5) format (make sure to supply port 25 or else `smtpmail` won't read the entry), and ensure that it is readable only by your user. An example of a netrc line follows. Replace '''$YOURNAME''' with your HCoop login name, '''$YOURPASSWORD''' with your password. {{{ machine mail.hcoop.net login $YOURNAME password $YOURPASSWORD port 25 }}} If you are using a vmail account, then use the form "{{{yourname@domain.tld}}}" for '''$YOURNAME''' in the above. This will work for any mail client that uses `message-mode` for editing and sending mail (e.g. Gnus). = Exim smarthost = This section explains how to set up a local Exim daemon on your computer to use our mail server as a smarthost. First, run {{{dpkg-reconfigure exim4}}} and choose to use {{{mail.hcoop.net}}}. In case you missed anything, here is a known working {{{/etc/exim4/update-exim4.conf.conf}}} file. '''$HOSTNAME''' is the hostname of your local machine. {{{ dc_eximconfig_configtype='satellite' dc_other_hostnames='$HOSTNAME' dc_local_interfaces='127.0.0.1' dc_readhost='$HOSTNAME' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='mail.hcoop.net' CFILEMODE='644' dc_use_split_config='true' dc_hide_mailname='true' dc_mailname_in_oh='true' dc_localdelivery='mail_spool' }}} Then, modify the {{{/etc/exim4/passwd.client}}} file to add a mapping for your HCoop username and password. {{{ mail.hcoop.net:$USERNAME:$PASSWORD }}} Finally, modify {{{/etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_smarthost}}} as follows. The '''hosts_require_auth''' and '''tls_tempfail_tryclear''' lines are the most important. {{{ remote_smtp_smarthost: debug_print = "T: remote_smtp_smarthost for $local_part@$domain" driver = smtp # NOTE: Force the connection to be authenticated. hosts_require_auth = <; ${if exists{CONFDIR/passwd.client} \ {\ ${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$host_address}}\ }\ {} \ } .ifdef REMOTE_SMTP_SMARTHOST_HOSTS_AVOID_TLS hosts_avoid_tls = REMOTE_SMTP_SMARTHOST_HOSTS_AVOID_TLS .endif .ifdef REMOTE_SMTP_HEADERS_REWRITE headers_rewrite = REMOTE_SMTP_HEADERS_REWRITE .endif .ifdef REMOTE_SMTP_RETURN_PATH return_path = REMOTE_SMTP_RETURN_PATH .endif # NOTE: Force the connection to use TLS. tls_tempfail_tryclear = false }}} ---- CategoryMemberManual CategoryNeedsWork