LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-13-2015, 03:36 AM   #1
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,057

Rep: Reputation: 47
procmail to external SMTP


I have tried to forward email using procmail recipe to external SMTP server, but failed.
I've got EXIM4 installed (Debian testing amd64).

Thanks.

edit: I've managed to use 'mail' command to send emails. but don't know how to use it with 'mailbox' type messages that have attachments.

Last edited by qrange; 01-13-2015 at 03:58 AM.
 
Old 01-13-2015, 07:26 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
man procmailex
 
Old 01-13-2015, 07:39 AM   #3
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,057

Original Poster
Rep: Reputation: 47
thanks, but the usual:
Code:
 ! user@somewhere.edu
simply doesn't work. I think its due to sendmail command also not working.
These command send emails with no problem from CLI, to given SMTP server: mail, mutt, swaks.
But I don't know how to use them with procmail to forward email.

edit: I've made some pathetic progress with this:
Code:
| uudeview -p $HOME/tmp/attachments - | swaks -4 --to email2@null.com --from email1@null.com --body "${BODY_}" --server smtp.server.com -ao --auth-user=luzer --attach $HOME/tmp/attachments/test.msg
hope someone could provide better solution.
thanks.

Last edited by qrange; 01-14-2015 at 12:22 AM.
 
Old 01-14-2015, 06:42 AM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Do you have a link from /usr/sbin/sendmail or /usr/lib/sendmail to exim?
http://www.exim.org/exim-html-curren...mand_line.html
 
1 members found this post helpful.
Old 01-15-2015, 12:29 AM   #5
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,057

Original Poster
Rep: Reputation: 47
yes,there is a link /usr/sbin/sendmail -> exim4
this seems to work with multiple attachments, but there must be better way:

Code:
| (uudeview -p $HOME/tmp/attachments - ; for file in ${adir}/*.msg;  do  atts="$atts --attach \"${file}\""; done;  swaks -4 --to email2@null.com --from "${FROM_}" --header "Subject: ${SUBJ_}" --body "${BODY_}" --server smtp.server.com -ao --auth-user=luzer --auth-password=pwd $atts )
thanks.

edit:
I've found this in returned mail: "Mailing to remote domains not supported"
I would like exim4 to be configured, so that all local email (like cron) stays local.

Last edited by qrange; 01-15-2015 at 12:36 AM. Reason: exim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mail.rc For External SMTP pshankland Linux - Software 3 07-02-2010 04:44 AM
smtp proxy filter to external isp smtp leandronf Linux - Server 2 02-01-2010 04:42 AM
issue with procmail recipe and external script nexus55 Linux - Server 1 05-27-2008 09:24 AM
Procmail : Cat from External File joseph Programming 3 12-11-2006 07:37 AM
qmail external smtp problem 3333 Linux - Software 5 03-20-2006 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration