EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10224
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Sending email from eprints using postfix
- To: David R Newman <drn@ecs.soton.ac.uk>, "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Sending email from eprints using postfix
- From: Will Hughes <w.p.hughes@reading.ac.uk>
- Date: Thu, 28 Aug 2025 18:02:38 +0000
Sent: Thursday, August 28, 2025 4:36:32 PM
To: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>; Will Hughes <w.p.hughes@reading.ac.uk>
Subject: Re: [EP-tech] Sending email from eprints using postfix
Hi Will,
I don't normally try bothering to configure email sending in EPrints with no configuration it will just pass in on the server it is running on's mail server (e.g. sendmail, postfix, etc.). I then configure that as a smarthost, as it is much better documented on how you need to configure that to authenticate email sending (e.g. using SMTP2GO), especially if you have unusual setup.
In 3.4.5 we introduced a separate $c->{senderemail} from $c->{adminemail}. This means that email sent list the senderemail in the from address but still user the adminemail in the email signature at the end of the message body and sets this adminemail as the reply-to address. Beyond senderemail and adminemail the only real email configuration I am away of is specifying the mail sending function you want to call with $c->{send_email} in lib/cfg.d/email.pl and the executable and invocation settings for sendmail in /opt/eprints3/lib/syscfg.d/executables.pl and /opt/eprints3/lib/syscfg.d/invocations.pl. The former is where you could configure the equivalent to $c->{sendmail_program} and the latter $c->{sendmail_args}. However, as the default for lib/cfg.d/email.pl is set to use the local mailserver (which I recommend is the best option as you can do mail configuration in a proper mail sending application), tweaking the sendmail settings will make no difference unless you change the $c->{send_email} (in lib/cfg.d/email.pl) to the following:
$c->{send_email} = \&EPrints::Email::send_mail_via_sendmail;
Regards
David Newman
CAUTION: This e-mail originated outside the University of Southampton.CAUTION: This e-mail originated outside the University of Southampton.OK, another day spent trying to overcome this issue. Put simply, my question is this:
How can I get the EPrints web interface to send email using the local Postfix sendmail, without hanging or trying to connect directly to SMTP2GO?
Please, if anyone has any ideas, I would love to hear them.
Thank you
Best wishes
Will
From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> On Behalf Of Will Hughes
Sent: 27 August 2025 19:36
To: EPrints.org Technical List <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] Sending email from eprints using postfix
CAUTION: This e-mail originated outside the University of Southampton.
CAUTION: This e-mail originated outside the University of Southampton.
Hi
I have been struggling with this issue for a while now. As far as I can tell, I have configured everything I need to get postfix to work in sending eprints system emails.
Summarizing: EPrints 3.4 on Ubuntu 24.04 with Postfix configured to relay via SMTP2GO. From the command line, sending email as the eprints user works:
echo "Test message" | sudo -u eprints /usr/sbin/sendmail -v will.hughes.rdg@gmail.com
The message is delivered successfully.
When using the web interface to send email (notifications, test messages), the process hangs indefinitely.
Current config in cfg.d/00_email.pl:
$c->{sendmail_program} = "/usr/sbin/sendmail";
$c->{sendmail_args} = "-oi -t";
$c->{email_from} = 'abstracts@arcomabstracts.com';
$c->{email_from_name} = 'ARCOM Abstracts';
$c->{email_reply_to} = 'abstracts@arcom.ac.uk';
Direct SMTP via $c->{sendmail_method} = 'SMTP' also fails. Postfix logs show successful deliveries from CLI; no related errors appear when the web interface hangs.
Does anyone have similar experience and/or a solution to this quandary, please?
Best wishes
Will
Will Hughes
Emeritus Professor of Construction Management and Economics
School of the Built Environment
University of Reading, PO Box 219, Whiteknights
Reading, RG6 6DF, UK
*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List *** Archive: https://www.eprints.org/tech.php/ *** EPrints community wiki: https://wiki.eprints.org/
- References:
- [EP-tech] Sending email from eprints using postfix
- From: Will Hughes <w.p.hughes@reading.ac.uk>
- RE: [EP-tech] Sending email from eprints using postfix
- From: Will Hughes <w.p.hughes@reading.ac.uk>
- Re: [EP-tech] Sending email from eprints using postfix
- From: David R Newman <drn@ecs.soton.ac.uk>
- [EP-tech] Sending email from eprints using postfix
- Prev by Date: Re: [EP-tech] Import from DOI (via CrossRef)
- Next by Date: Re: [EP-tech] [eprints/eprints3.4] Release v3.4.7 - EPrints 3.4.7
- Previous by thread: Re: [EP-tech] Sending email from eprints using postfix
- Next by thread: Re: [EP-tech] [eprints/eprints3.4] Release v3.4.7 - EPrints 3.4.7
- Index(es):