LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-20-2003, 07:22 AM   #1
anibiswas
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Rep: Reputation: 0
Angry procmail and fetchmail configuration


Hello there,

Can any one help me to configure my procmail.

Actually what I need is, I want to first read my email and append some text with the message and send it to the user.

I will receive my emails as abc@domain.com.mydomain.com
I have to receive this email in my domain and append some text to it and send it to abc@domain.com.

Should I confogure fetchmail or procmail?

Can any one help me please.

With regards
Anirban Biswas
 
Old 10-20-2003, 04:51 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
I will receive my emails as abc@domain.com.mydomain.com
Unless you mean something like for instance "abc@some.domain.com" this looks like badly configured delivery to me.

append some text to it and send it to abc@domain.com
Forwarding email shouldn't be hard to do with procmail but I'm not sure about adding text.
 
Old 10-21-2003, 01:55 AM   #3
anibiswas
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for your reply,

Suppose user A has an email account in yahoo.com and send email to user B ar hotmail.com

So in "To" he types username@hotmail.com and appends ".mydomain.com" so that the email gows from my server to hotmail server.

So, "To" becomes "username@hotmail.com.mydomain.com"

According to this i need to configure my pop server sothat it can receive these types of email. and then append some text in the body and send it through SMTP to username@hotmail.com.

This is what I need.

Can you or any one help me please?

Anirban
 
Old 10-27-2003, 07:14 AM   #4
anibiswas
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Can any one tell me how to solve the above said problem?

Should I configure procmail or fetchmail?

Please help
 
Old 10-27-2003, 07:41 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
Suppose user A has an email account in yahoo.com and send email to user B ar hotmail.com
...then the MTA of yahoo.com decides by reading the MX records for hotmail.com which address to drop that mail to. Executing "dig mx hotmail.com" shows your .mydomain.com isn't one of the MXes for hotmail, so your approach won't work.

What you could try is for example send your email to username_hotmail@mydomain.com, process it and forward it to username@hotmail.com. It will show your .mydomain.com as the sender, so you won't be tempted to use it for spam and you can't use it for man in the middle type of tricks.
 
Old 10-27-2003, 07:48 AM   #6
robartes
Member
 
Registered: Oct 2003
Location: Mechelen, BE
Distribution: Mandrake as base, most software hand rolled
Posts: 80

Rep: Reputation: 15
Quote:
Originally posted by anibiswas
So in "To" he types username@hotmail.com and appends ".mydomain.com" so that the email gows from my server to hotmail server.

So, "To" becomes "username@hotmail.com.mydomain.com"

According to this i need to configure my pop server sothat it can receive these types of email. and then append some text in the body and send it through SMTP to username@hotmail.com.

This is what I need.

Can you or any one help me please?

If it's just a POP server you have, you can't do this. You have to setup an SMTP server that relays mail for all the domains you want to treat this way, and you need to have MX records in DNS for these domains pointing to that server. Then set up rewriting rules in your MTA (the SMTP server) to relay that mail to the correct place.

If you have no idea of what all of the above is, you should not be messing about with rerouting people's email. Sorry.
 
Old 10-27-2003, 07:51 AM   #7
lupin_the_3rd
Member
 
Registered: Oct 2003
Location: Memphis, TN
Distribution: Slackware current
Posts: 485

Rep: Reputation: 30
You can preconnect fetchmail to another program that may be able to attach text for you... or a script. I preconnect mailfilter to fetchmail to weed out spam. my fetchmailrc looks like this:

poll mail.myisp.net with proto pop3:
user "jethro" there has password "yomama"
is jtoe here and wants mda "/usr/bin/procmail -f -"
preconnect "mailfilter --mailfilterrc=/home/jtoe/.mailfilterrc"

Maybe this will give you some direction to head... not sure what typr of program you could use to append text b ut I'm sure it can be done.
 
Old 11-01-2003, 06:20 AM   #8
anibiswas
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Original Poster
Rep: Reputation: 0
I have a domain like mydomain.com and a virtual host domain as something.mydomain.com with an IP.

My objective is that I want to send all mails directed to *.something.mydomain.com (eg xxx@yahoo.com.aa.bb.something.mydomain.com)
to a user say root in something.mydomain.com. I mean all mails coming in *.something.mydomain.com should be redirected to root@something.mydomain.com.

something.mydomain.com is also my mail server.

I am using Red Hat Linux with Bind .

I have created zone file like mydomain.com.zone in /var/named with
an wildcard Mx Entry and A record. and also pointed this file in named.conf.

But it is not working .

My zone file looks like this :


@ IN SOA ns1.mydomain.com. root.mydomain.com. (
2003080801 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; default_ttl
)
;name server
IN NS ns1.mydomain.com.
IN NS ns2.mydomain.com.

;mail server

*.mydomain.com. IN MX 10 someone.mydomain.com

;public server

ns1.mydomain.com IN A ip- of- primary name- server
ns2.mydomain.com IN A ip- of- slave name- server
www IN A ip- of- mail- server
ftp IN A ip- of- mail- server
mail IN A ip- of- mail- server

;end


# Now I have written in named.conf file
zone "vpscenter.com"{
type master;
file "vpscenter.com.zone";
allow-transfer { ip- of- slave name- server

};

I have started named dameon.
but I am not getting the desired result.

when I sending any mail at say root@xx.yy.something.mydomain.com

It is showing Host unknown.

am I missing something?

Please advice me with detailed steps, all necessary configurations and sample code ( zone files etc) ASAP.

Thanks
 
  


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
postfix - procmail, fetchmail varun_saa Mandriva 3 09-11-2005 12:53 AM
fetchmail and procmail ryedunn Linux - Newbie 1 10-20-2004 10:37 AM
fetchmail -> procmail -> amavis can it be done? ChaosX2 Linux - Networking 2 01-11-2004 03:56 AM
sendmail, procmail, fetchmail manjunja Linux - Software 0 07-10-2003 02:39 AM
fetchmail + procmail (?) markus1982 Linux - Networking 1 11-12-2002 06:18 PM

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

All times are GMT -5. The time now is 03:52 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