LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-08-2002, 03:35 PM   #1
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
qmail + fetchmail + pine + rewriting headers, how?


My installation is just about working. I use fetchmail to retrieve the mail from my two POP3 accounts and have qmail running and pine configured to use the fake sendmail binary that came with qmail.

If I receive mail, everything's fine. But if I want to send mail I need to rewrite the from address from username@somewhere.domain.com to otheruser@domain.com.
If I add this to the environment:

MAILHOST=domain.com
MAILUSER=otheruser
QMAILINJECT=f

Then when qmail-inject is called from pine (through the fake sendmail) it rewrites the header correctly. The big problem with this is that the header is also rewritten if fetchmail calls qmail-inject, so every incoming mail looks like it's coming from otheruser@domain.com.

How can I fix this?
 
Old 01-08-2002, 03:55 PM   #2
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
easiest way is to just set the header in pine in the customized-hdrs sectino in the setup. its not a particuarly nice thing to do, but then no worse than needing to lie about your domain name in the first place...
 
Old 01-08-2002, 04:32 PM   #3
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Original Poster
Rep: Reputation: 30
I've tried what you said, but it's not quite working.

Here's some data:
- The user name at the local computer of the user starting pine is 'username'
- The host that's running qmail and pine is 'hostname.somewhere.com'
- The user name at the mail server is 'othername'
- The domain for which the mail server is handling mail is 'somewhere.com'
- The hostname of the mail server is 'realname.somewhereelse.com'

Like I said I would like to be able to send mail with 'othername@somewhere.com' in the From line. But now I have 'username@somewhere.com' in there.

From /etc/pine.conf:
sendmail-path=/usr/lib/sendmail -oem -oi -t
(which is the sendmail wrapper provided by qmail)

/home/username/.qmail:
./Maildir/

/home/username/.fetchmailrc:
poll realname.somewhereelse.com
protocol POP3 username 'othername' password 'somepassword' is username here
forcecr fetchall
mda "/var/qmail/bin/qmail-inject username"

From /home/username/.pinerc:
user-domain=somewhere.com
customized-hdrs=From: Myname <othername@somewhere.com>

I have also tried using
sendmail-path=/usr/lib/sendmail -oem -oi -t -fothername@somewhere.com
and
sendmail-path=/usr/lib/sendmail -oem -oi -t -fothername
in /etc/pine.conf, but that didn't work either.

In /var/log/qmail.log I can see:
info msg 292298: bytes 346 from <othername@somewhere.com> qp 12600 uid 501
starting delivery 23: msg 292298 to remote someguy@computer.net
status: local 0/20 remote 1/90
delivery 23: success: xxx.xxx.xxx.xxx_accepted_message./Remote_host_said:_250_2.0.0_g08M8ROf072068_Message_accepted_for_delivery/
status: local 0/20 remote 0/90
end msg 292298

But still that person saw the mail came from username@somewhere.com.

Help, pls! =(
 
  


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
Amavisd-new + no longer rewriting headers Ateo Linux - Software 0 06-22-2005 08:06 PM
fetchmail configuration in qmail? confident119 Linux - Networking 1 03-12-2005 02:11 AM
multiple pop3 accounts with fetchmail and pine ANU Linux - Software 1 03-15-2004 07:16 PM
Configuring pine and fetchmail k4zau Linux - Software 8 04-26-2003 06:02 PM
qmail and pine forand Linux - Software 2 05-05-2002 08:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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