PDA

View Full Version : nms FormMail pains



togross
07-07-2004, 08:59 PM
nms formmail has been working fine for a year, but now I need to change the email recipient. Once I change both the @allow_mail_to and %recipient_alias lines, it stops sending messages. Only way I can get a mail is to put the recipient address in as the form's email field. ??? Any suggestions? Any better/more current program for forms handling?

Also, how does logging work with nms formmail? Where would I find the log? I can't tell if it is sending mails or just generating crap that can't get delivered.

todd

wildjokerdesign
07-07-2004, 10:51 PM
Don't belive there is a log for FormMail. You can take a look in your root directory to see if there is a file called deadletter or something similiar. At one time junk from scripts that could not be sent got thrown there.

So are you doing something like this?



@allow_mail_to = qw(addy1@domain.com);
%recipient_alias = (
aliase1 => 'addy1@domain.com',
);


I can't think why that would not work. If I recall correctly you can leave the @allow_mail_to blank and the script is still pretty secure but has been awhile since I worked with the program. I think that the script uses the @allow_mail_to to check the recipient field so if you left it blank it would then use the %recipeint_alias to check the field and allow the email through. Do you get an error or does the form act like it sends the email but you never recieve it? If it does act like it sends it then do look for the deadletter file in your root.

jalal
07-08-2004, 05:27 AM
NMS FormMail is about the best formmail script I've seen out there. I use it on many sites and its been working fine.

Assuming that you don't want to put the email into the html file (and you really don't!)...
There are three fields affecting the recipient
@allow_mail_to
@recipients
%recipient_alias

If you only have one user of the formmail then the only field you need is the @allow_mail_to, the others can be blank.
@allow_mail_to just has the email address that you want to send the email to.

NMS FormMail doesn't produce logs as far as I know, you would have to use the sendmail logs to find out what is happening.

HTH

togross
08-02-2004, 03:37 PM
I've chased it down a bit more and determined that I can send to off-site addresses fine, but any on-site addresses I try to send to either aren't sent or aren't received. I can send the exact same info by hand, so I don't think it is SA eating it.



@referers = qw(enterpriselogix.com 69.36.165.134);

@allow_mail_to = qw(addy1@enterpriselogix.com addy2@enterpriselogix.com skoot@bellsouth.net mail.enterpriselogix.com enterpriselogix.com localhost);

@recipients = ();

%recipient_alias = (
'1' => 'addy1@enterpriselogix.com',
'2' => 'addy2@enterpriselogix.com',
'3' => 'skoot@bellsouth.net',
);


Any suggestions?

Todd

togross
08-02-2004, 03:39 PM
Sorry. The 'site' is enterprselogix.com. I can send using address #3 but not the other 2 (actual script has valid addresses in it).

Todd

wildjokerdesign
08-02-2004, 06:06 PM
Are the addys you are trying to send to on your account real email accounts or just aliases. Couldn't find mention of that in any of your post. Some scripts seem to have not been able to send to alias addys but have been able to send to addys that where set up with email/ftp. Can't tell you why or if that would even be the problem here but thought I would ask.

I can't see anything wrong with your settings but will come back and look at them again later. Sometimes I see something the second time around.

togross
08-02-2004, 07:36 PM
Are the addys you are trying to send to on your account real email accounts or just aliases.

They're real addresses. Just didn't want to put then in a scanable post. Call me paranoind. The addresses are live and work just fine for everything except this.

Any suggestions are appreciated. I haven't tried using only one address yet, but I don't think that will help, since it 'switches' between addresses fine.

Todd

wildjokerdesign
08-02-2004, 08:47 PM
Try removeing everything from @allow_mail_to and just leave it blank. Go ahead and add localhost to @referers. See if that allows mail through. I don't think it comprimizes the security any. You never said if you found a file called dead.letter in your root directory or not.

By the way SA won't remove or not allow the emails through it would just mark them as spam although even that is unlikely. Unless that is you have set up procmail or something else to delete them.

jalal
08-03-2004, 02:08 AM
@referers = qw(enterpriselogix.com 69.36.165.134);

@allow_mail_to = qw(addy1@enterpriselogix.com addy2@enterpriselogix.com skoot@bellsouth.net mail.enterpriselogix.com enterpriselogix.com localhost);

@recipients = ();

%recipient_alias = (
'1' => 'addy1@enterpriselogix.com',
'2' => 'addy2@enterpriselogix.com',
'3' => 'skoot@bellsouth.net',
);


Hi Todd

I assume that in your HTML form you have a line referring to the recipient_alias, something like:
<input type="hidden" name="recipient" value="2">
for example??

togross
08-03-2004, 09:32 AM
HTML form you have a line referring to the recipient_alias, something like:
<input type="hidden" name="recipient" value="2">

Yup. That part seems to be working OK. I can send it a "3" [referring to an off-site address] and it sends fine. When I send it a "1" or "2" with the on-site addresses nothing goes through. I've put it in 'debug errors to browser' mode and don't see any problems.

Todd

jalal
08-03-2004, 04:06 PM
Hmm, I have a very similar setup on one of my clients sites and the only difference I can see is that they have 'localhost' in the @referers array.
Oh, and the last recipient alias doesn't have a comma after it...

Try those two things and see if it helps.