Find the answer to your Linux question:
Results 1 to 3 of 3
This may sound like a nefarious questions, but I have good intent. I have a system set up that receives test messages from my phone by polling a Gmail account ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    31

    mail spoofing senders address


    This may sound like a nefarious questions, but I have good intent. I have a system set up that receives test messages from my phone by polling a Gmail account every 30 sec for new emails. When it gets the emails it looks at the message and acts accordingly. After it is done acting (could be something as simple as pinging a machine as an example) it sends back results by pulling the senders email from the message downloaded from my gmail account. My problem is now I want to reply back. To do this I must go create a new message and then select the contact. I'd like to be able to just hit the reply button and start typing but when I do this it attempts to send it back to my machine which sent the email instead of to the Gmail account. So is there anyway to spoof the email account so it seems like it is coming from my Gmail account as opposed to from my Machine itself either using mail or another program?

    Thanks,
    John

  2. #2
    Just Joined!
    Join Date
    Oct 2008
    Location
    Baton Rouge, LA
    Posts
    37
    Add the following to your mc file used to generate sendmail.cf:
    FEATURE(`genericstable', `dbm /etc/mail/genericstable')dnl
    GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain`)dnl

    Of course you can change the names of the files to be what you want. These are only suggestions.

    Regen sendmail.cf
    use the m4 command to do this. While in /usr/samples/tcpip/sendmail.cf run the command:
    m4 ../m4/cf.m4 your.mc > /tmp/sendmail.cf

    Create genericstable
    vi /etc/mail/genericstable. Add the users you want to change the email address for. The format is 'user email@domain.com'. The file is tab delimited.

    After you have made the file use the makemap command to get it ready for sendmail to use. 'makemap dbm genericstable < genericstable'

    Create genericsdomain
    Run the following command as root:
    sendmail -bt -d0.1 < /dev/null

    This will give you an idea of what you need to place in the genericsdomain file. This does not need to have anything done to it, so just leave the file as it is.

    Move sendmail.cf into place
    Now that everything else is done, move /tmp/sendmail.cf to /etc/mail. Restart sendmail if it is actively running on the system.

    this was on another forum and i'm not sure that linking is allowed here. i didn't want to violate the rules but also i didn't want to take credit for any one elses work. i have done this myself as described above and it worked fine for me.

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    31
    Thanks for the reply. I have a few questions.


    1.Regen sendmail.cf use the m4 command to do this. While in /usr/samples/tcpip sendmail.cf run the command:
    m4 ../m4/cf.m4 your.mc > /tmp/sendmail.cf

    did you mean to have sendmail.cf on the end of that. Because that's a file. So should I add the line to that file or run that command in the directory that has that file?



    2. makemap dbm genericstable < genericstable

    this command outputs this error
    makemap: Need to recompile with -DNDBM for dbm support
    how can I recompile it? I am running Ubuntu 8.04 and got that package by installing sendmail-bin using apt-get.



    3.This will give you an idea of what you need to place in the genericsdomain file. This does not need to have anything done to it, so just leave the file as it is.

    does this mean I can skip this step?


    Thanks for all the help!

    - John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •