User Tools

Site Tools


dev:email

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dev:email [2022/10/24 11:10] – created -- Thanks to Bill Erickson, Jason Stephenson, and Chris Sharp for this info! sandbergjadev:email [2023/10/19 09:47] (current) – [The easiest option: using a localhost email address and mutt] add mutt troubleshooting tip sandbergja
Line 8: Line 8:
  
   - As the root user (or with sudo): install mutt (apt-get install mutt)   - As the root user (or with sudo): install mutt (apt-get install mutt)
 +  - As opensrf, run the `mutt` command, and make sure you get an inbox without a warning.  If mutt gives you an error "No such file or directory", you can fix it with `touch $MAIL`.
 +  - As root, make sure that sendmail is running (`service sendmail start` and `service sendmail status`)
   - Set the recipient email address to opensrf@localhost (for example, if you are testing a message sent to patrons, set your test patron's email address to opensrf@localhost)   - Set the recipient email address to opensrf@localhost (for example, if you are testing a message sent to patrons, set your test patron's email address to opensrf@localhost)
   - Run the process that you'd like to check the email output of.   - Run the process that you'd like to check the email output of.
Line 16: Line 18:
  
 [[https://www.exim.org/|Exim]] has an easy setup in debian, with the exim configure script.  For testing purposes, set the email address to be your own. [[https://www.exim.org/|Exim]] has an easy setup in debian, with the exim configure script.  For testing purposes, set the email address to be your own.
 +
 +For testing with live data, exim makes it easy to rewrite recipients, so you can prevent test emails from being sent to real email addresses.
 +
 +Look for the "REWRITE CONFIGURATION" section in /etc/exim4/exim4.conf.template
 +
 +Docs are at : https://www.exim.org/exim-html-current/doc/html/spec_html/ch-address_rewriting.html
 +
 +Something like this sends all mail to a local address.
 +  ##Send all messages to root@localhost
 +  *@* root@localhost Tbct
  
 ===== Option 3: postfix ===== ===== Option 3: postfix =====
  
 If you have access to your postfix production configuration, you can tweak it for your development environment. If you have access to your postfix production configuration, you can tweak it for your development environment.
 +
 +For those running a test server with live data that want to test email without worrying about accidentally emailing real people, one method is to force all email delivery to one local account.  A guide to do this in postfix is at [[https://www.euperia.com/wrote/how-to-configure-postfix-to-deliver-all-mail-to-one-mailbox]]
  
dev/email.1666624243.txt.gz · Last modified: 2022/10/24 11:10 by sandbergja

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.