 |
|
 |
|
Next: Site check please
|
| Author |
Message |
External

Since: Jun 30, 2003 Posts: 59
|
(Msg. 1) Posted: Fri Sep 26, 2003 2:03 pm
Post subject: Can I dynamically set up and destroy email addresses? Archived from groups: alt>www>webmaster (more info?)
|
|
|
Okay, SoBig mostly passed me by, but Swen is clogging up one or two of my
addresses now. It's fairly trivial to set up a script that will dynamically
display a different address which changes with time:
september2003 RemoveThis @example.com
october2003 RemoveThis @example.com
and so on. But is it possible to automatically set up and destroy addresses in
this way, so that spam sent to the old addresses would just bounce? To do it
manually would be a pain. I'm wondering if this is something only a host could
set up, or could it be done as a cron job set up by a user?
--
Alice Woolley
http://www.insidethebubble.co.uk/
Inside the Bubble - autism information >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Jul 01, 2003 Posts: 411
|
(Msg. 2) Posted: Fri Sep 26, 2003 5:07 pm
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Foxglove54321 wrote:
> Okay, SoBig mostly passed me by, but Swen is clogging up one or two of my
> addresses now. It's fairly trivial to set up a script that will dynamically
> display a different address which changes with time:
>
> september2003.RemoveThis@example.com
> october2003.RemoveThis@example.com
>
> and so on. But is it possible to automatically set up and destroy addresses in
> this way, so that spam sent to the old addresses would just bounce? To do it
> manually would be a pain. I'm wondering if this is something only a host could
> set up, or could it be done as a cron job set up by a user?
Set up a cron job to run on the first of every month:
0 0 1 * * /root/bin/aliases-swap.php 1>/dev/null 2> /dev/null
The set up a script to handle the swapping (completely untested!):
#!/usr/local/bin/php -q
<?php
// define the location of the aliases file
$aliases_file='/etc/aliases';
if($fp=fopen($aliases_file,'rw')){
// the file is open, read it in
$contents=file($aliases_file);
// define the pattern to look for and what to replace it with
$search='/'.strtolower(date('FY',strtotime('1 month
ago'))).'  .*)/';
$replace=strtolower(date('FY')).":$1";
// this will hold the resulting file
$results=array();
// backup the old file
copy($aliases_file,$aliases_file.'.old');
// replace the aliases file
foreach($contents as $i=>$line){
$results[]=preg_replace($search,$replace,$line);
}
unset($contents);
if(!fwrite($fp,join('',$results),strlen(join('',$results)))){
echo 'Monthly alias swap failed. ';
echo 'Cannot write to ',$aliases_file,"\n\n";
exit;
}
fclose($fp);
echo 'Monthly alias swap successful.',"\n\n";
echo join('',$results),"\n";
}else{
echo 'Monthly alias swap failed. ';
echo 'Cannot open ',$aliases_file,' for write.',"\n";
fclose($fp);
}
?>
Then that's all there is to it! PHP is just the language I most
frequently use, if I was to actually do this, I'd use bash or perl, but
it get's the point across.
--
Justin Koivisto - spam.RemoveThis@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2004 Posts: 1010
|
(Msg. 3) Posted: Sat Sep 27, 2003 9:44 am
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Foxglove54321" <foxglove54321.RemoveThis@aol.comblahblah> wrote in message
news:20030926070300.02717.00000220@mb-m24.aol.com...
> Okay, SoBig mostly passed me by, but Swen is clogging up one or two of my
> addresses now. It's fairly trivial to set up a script that will
dynamically
> display a different address which changes with time:
>
> september2003.RemoveThis@example.com
> october2003.RemoveThis@example.com
>
> and so on. But is it possible to automatically set up and destroy
addresses in
> this way, so that spam sent to the old addresses would just bounce? To do
it
> manually would be a pain. I'm wondering if this is something only a host
could
> set up, or could it be done as a cron job set up by a user?
>
It is possible but dependant on your access.
What is your level of hosting? Most hosted sites do not have write
permissions to the ect/aliases file, many do not even have read permission,
and you need read/write permissions at least to be able to do that.
Depending on your mail server you will also need to be able to run
newaliases (or similar) in order for the changes made to the aliases file to
be registered in the aliases database.
I also doubt very much if a host would set up such a script. As what I
describe above requires root access it would breach the most fundamental
rule of root. 'Never log on as root unless your life depends on it - then
flip a coin to be sure!"
As a host who provides a range of hosting from the simple control panel
access type to those with shell access there is no way I would give 'my'
access to anyone.
The only sure way of avoiding spam from a site is to use form based comms.
That way you can cantrol what comes in and what does not.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Jul 01, 2003 Posts: 411
|
(Msg. 4) Posted: Sat Sep 27, 2003 9:44 am
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Bill Logan wrote:
> Depending on your mail server you will also need to be able to run
> newaliases (or similar) in order for the changes made to the aliases file to
> be registered in the aliases database.
Oh yeah, sendmail does that right? I use exim, so I simply edit the file.
> I also doubt very much if a host would set up such a script. As what I
> describe above requires root access it would breach the most fundamental
> rule of root. 'Never log on as root unless your life depends on it - then
> flip a coin to be sure!"
hmm... I guess if you're not the admin, then you would have to call your
host each time you wanted to change. Unless, of course, the admin has
set up each domains aliases in separate alias files that the domain
owner could edit. Possible use of databases may also help in this type
of situation - above my head... I'll continue to un a single domain on
my mail server thank you.
> As a host who provides a range of hosting from the simple control panel
> access type to those with shell access there is no way I would give 'my'
> access to anyone.
Nor would I - that's suicide to your bank account.
> The only sure way of avoiding spam from a site is to use form based comms.
> That way you can cantrol what comes in and what does not.
And that doesn't avoid it either, but does a damn good job in many cases.
--
Justin Koivisto - spam.RemoveThis@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2004 Posts: 1010
|
(Msg. 5) Posted: Sat Sep 27, 2003 2:36 pm
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Justin Koivisto" <spam.DeleteThis@koivi.com> wrote in message
news:E_0db.1016$ow5.42760@news7.onvoy.net...
> Bill Logan wrote:
> > Depending on your mail server you will also need to be able to run
> > newaliases (or similar) in order for the changes made to the aliases
file to
> > be registered in the aliases database.
>
> Oh yeah, sendmail does that right? I use exim, so I simply edit the file.
Sendmail does not do it. sendmail simply 'reads' the virtmaps.db and the
aliases.db in that order. To put entries into the db's an entry must be
manually, (or with a script such as Ensim uses), be placed into the aliases
or virtmaps file and then the script, usually located in one of the bin
dirs, again either newvirtmaps or newaliases must be run in order for the db
to be updated.
Those file because of their location and their permissions (755) can
generally only be written to as the owner - usually root.
Ensim can do it with individually entered data - as when a user/site admin/
or reseller admin enters a new username. However, the OP was looking for an
automated script solution and unless you have access to hook into the ensim
scripts, (which most hosted clients would not have) it would not be an
option
>
> > I also doubt very much if a host would set up such a script. As what I
> > describe above requires root access it would breach the most fundamental
> > rule of root. 'Never log on as root unless your life depends on it -
then
> > flip a coin to be sure!"
>
> hmm... I guess if you're not the admin, then you would have to call your
> host each time you wanted to change. Unless, of course, the admin has
> set up each domains aliases in separate alias files that the domain
> owner could edit.
The only way that would work would be if the admin also set up a cron job to
run newaliases or newvirtmaps and then that would only be useful if the
cronjob ran often enough to make changes in a reasonable time.
Possible use of databases may also help in this type
> of situation - above my head... I'll continue to un a single domain on
> my mail server thank you.
>
> > As a host who provides a range of hosting from the simple control panel
> > access type to those with shell access there is no way I would give 'my'
> > access to anyone.
>
> Nor would I - that's suicide to your bank account.
>
> > The only sure way of avoiding spam from a site is to use form based
comms.
> > That way you can cantrol what comes in and what does not.
>
> And that doesn't avoid it either, but does a damn good job in many cases.
I beg to differ there. If you write a solid secure script, accessable only
from one url, practice field varification / banning of selected words /
content /type and hardwire the destination people can only send you what you
want.
EG if you have a name field and you varify alphnumeric only and disallow
html etc. and limit the length, even go the extent of requireing firstletter
uppercase following letters lower case and so on and so forth you will not
get any spam.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Jun 30, 2003 Posts: 59
|
(Msg. 6) Posted: Sat Sep 27, 2003 7:12 pm
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Bill Logan wrote:
>Those file because of their location and their permissions (755) can
>generally only be written to as the owner - usually root.
>
>Ensim can do it with individually entered data - as when a user/site admin/
>or reseller admin enters a new username. However, the OP was looking for an
>automated script solution and unless you have access to hook into the ensim
>scripts, (which most hosted clients would not have) it would not be an
>option
By the sounds of this, and it's a bit over my head, I don't have the
permissions to set this up.
>> > The only sure way of avoiding spam from a site is to use form based
>comms.
>> > That way you can cantrol what comes in and what does not.
>>
>> And that doesn't avoid it either, but does a damn good job in many cases.
>I beg to differ there. If you write a solid secure script, accessable only
>from one url, practice field varification / banning of selected words /
>content /type and hardwire the destination people can only send you what you
>want.
>EG if you have a name field and you varify alphnumeric only and disallow
>html etc. and limit the length, even go the extent of requireing firstletter
>uppercase following letters lower case and so on and so forth you will not
>get any spam.
The thing is, with mailto: you get fewer faked return addresses. Forms are a
good solution in general, I'm just wondering whether any other solutions will
work.
--
Alice Woolley
<a style='text-decoration: underline;' href="http://www.insidethebubble.co.uk/" target="_blank">http://www.insidethebubble.co.uk/</a>
Inside the Bubble - autism information<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2004 Posts: 1010
|
(Msg. 7) Posted: Sun Sep 28, 2003 9:58 am
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Foxglove54321" <foxglove54321 DeleteThis @aol.comblahblah> wrote in message
news:20030927121210.00726.00000229@mb-m19.aol.com...
> Bill Logan wrote:
> >Those file because of their location and their permissions (755) can
> >generally only be written to as the owner - usually root.
> >
> >Ensim can do it with individually entered data - as when a user/site
admin/
> >or reseller admin enters a new username. However, the OP was looking for
an
> >automated script solution and unless you have access to hook into the
ensim
> >scripts, (which most hosted clients would not have) it would not be an
> >option
>
> By the sounds of this, and it's a bit over my head, I don't have the
> permissions to set this up.
>
> >> > The only sure way of avoiding spam from a site is to use form based
> >comms.
> >> > That way you can cantrol what comes in and what does not.
> >>
> >> And that doesn't avoid it either, but does a damn good job in many
cases.
> >I beg to differ there. If you write a solid secure script, accessable
only
> >from one url, practice field varification / banning of selected words /
> >content /type and hardwire the destination people can only send you what
you
> >want.
> >EG if you have a name field and you varify alphnumeric only and disallow
> >html etc. and limit the length, even go the extent of requireing
firstletter
> >uppercase following letters lower case and so on and so forth you will
not
> >get any spam.
>
> The thing is, with mailto: you get fewer faked return addresses. Forms are
a
> good solution in general, I'm just wondering whether any other solutions
will
> work.
>
To avoid most spammers, at least the automatd ones if you want people to
click on a link you could use one of the many js options available or you
could even resort to the varification of a picture text content to allow
access to the e-mail link.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Sep 26, 2003 Posts: 261
|
(Msg. 8) Posted: Sun Sep 28, 2003 9:58 am
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Bill Logan schrieb:
> To avoid most spammers, at least the automatd ones if you want people to
> click on a link you could use one of the many js options available or you
> could even resort to the varification of a picture text content to allow
> access to the e-mail link.
This sounds like a good plan, I was considering it myself. Unfortunately
it requires both Javascript and vision, which means it's not an
accessible solution. Depending on the "market" that might not matter too
much, but personally I'd prefer something that works for all people
(well, all people with a User Agent that can handle forms, at least...).
Matthias<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2004 Posts: 1010
|
(Msg. 9) Posted: Sun Sep 28, 2003 12:10 pm
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Matthias Gutfeldt" <say-no-to-spam DeleteThis @gmx.net> wrote in message
news:3F75DDF3.6D95EBCF@gmx.net...
> Bill Logan schrieb:
> > To avoid most spammers, at least the automatd ones if you want people to
> > click on a link you could use one of the many js options available or
you
> > could even resort to the varification of a picture text content to allow
> > access to the e-mail link.
>
> This sounds like a good plan, I was considering it myself. Unfortunately
> it requires both Javascript and vision, which means it's not an
> accessible solution. Depending on the "market" that might not matter too
> much, but personally I'd prefer something that works for all people
> (well, all people with a User Agent that can handle forms, at least...).
>
The number in a picture varification is standard html. Works on all UA<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Jun 28, 2003 Posts: 1662
|
(Msg. 10) Posted: Sun Sep 28, 2003 12:10 pm
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Bill Logan" <who.DeleteThis@what.com> wrote in message news:3f75fb2a$1@clear.net.nz...
>
> "Matthias Gutfeldt" <say-no-to-spam.DeleteThis@gmx.net> wrote in message
> news:3F75DDF3.6D95EBCF@gmx.net...
> > This sounds like a good plan, I was considering it myself. Unfortunately
> > it requires both Javascript and vision, which means it's not an
> > accessible solution. Depending on the "market" that might not matter too
> > much, but personally I'd prefer something that works for all people
> > (well, all people with a User Agent that can handle forms, at least...).
> >
> The number in a picture varification is standard html. Works on all UA
I think the point was that blind people could not see the picture, and it
would not be read to them.
--
Charles Sweeney
<a style='text-decoration: underline;' href="http://www.CharlesSweeney.com" target="_blank">www.CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2004 Posts: 1010
|
(Msg. 11) Posted: Mon Sep 29, 2003 1:20 am
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Charles Sweeney" <me DeleteThis @charlessweeney.com> wrote in message
news:bl53u9$834ip$1@ID-162618.news.uni-berlin.de...
> "Bill Logan" <who DeleteThis @what.com> wrote in message
news:3f75fb2a$1@clear.net.nz...
> >
> > "Matthias Gutfeldt" <say-no-to-spam DeleteThis @gmx.net> wrote in message
> > news:3F75DDF3.6D95EBCF@gmx.net...
> > > This sounds like a good plan, I was considering it myself.
Unfortunately
> > > it requires both Javascript and vision, which means it's not an
> > > accessible solution. Depending on the "market" that might not matter
too
> > > much, but personally I'd prefer something that works for all people
> > > (well, all people with a User Agent that can handle forms, at
least...).
> > >
> > The number in a picture varification is standard html. Works on all UA
>
> I think the point was that blind people could not see the picture, and it
> would not be read to them.
Ok, how about a wave file that spells out the e-mail address.
Oh dear, then deaf people wont get it. Ok, how about a picture file with a
wave file as an alt.
Damn it, Ive got a headache. I think I will just stick to forms as I
originally sugested, then if people cant access it well too bad and tough! I
am tired of being politically correct. From now on I do things my way and if
anyone wants to look then they will need the tools I use or go without.
Sorry Charles, it's not you, its the impossibility of finding a colour that
pleases everyone and ending up a shade of grey.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
External

Since: Jul 01, 2003 Posts: 82
|
(Msg. 12) Posted: Mon Sep 29, 2003 1:20 am
Post subject: Re: Can I dynamically set up and destroy email addresses? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Bill Logan wrote:
> "Charles Sweeney" <me.RemoveThis@charlessweeney.com> wrote in message
> news:bl53u9$834ip$1@ID-162618.news.uni-berlin.de...
>> I think the point was that blind people could not see the picture, and it
>> would not be read to them.
>
> Ok, how about a wave file that spells out the e-mail address.
> Oh dear, then deaf people wont get it. Ok, how about a picture file with a
> wave file as an alt.
<a style='text-decoration: underline;' href="http://www.joeclark.org/book/sashay/serialization/Chapter06.html#h2-6620" target="_blank">http://www.joeclark.org/book/sashay/serialization/Chapter06.html#h2-6620</a>
--
Iso.
FAQs: <a style='text-decoration: underline;' href="http://html-faq.com" target="_blank">http://html-faq.com</a> <a style='text-decoration: underline;' href="http://alt-html.org" target="_blank">http://alt-html.org</a> <a style='text-decoration: underline;' href="http://allmyfaqs.com/" target="_blank">http://allmyfaqs.com/</a>
Recommended Hosting: <a style='text-decoration: underline;' href="http://www.affordablehost.com/" target="_blank">http://www.affordablehost.com/</a>
Web Design Tutorial: <a style='text-decoration: underline;' href="http://www.sitepoint.com/article/1010" target="_blank">http://www.sitepoint.com/article/1010</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Can I dynamically set up and destroy email addresses? |
|
| Back to top |
|
 |  |
| Related Topics: | Form - database - email. How? - What I'm looking to do is have people enter details into a form. On submitting, the form details will be entered into a database. So far so good. This is where I'm crashing and burning - after the new details have been entered I want the database to be....
Need Email Hosting Service - Can someone recommend an email hosting service for a company domain with less than 10 email accounts? We recently switched to Entergroup and it has been a disaster. Thanks for any recommendations.
Email header problems. - Hi, Does anybody know anything about the following message... "Disallowed MIME characters found in headers" This was relating to a message that was sent to a sunscriber of my newsletter service that they subscribe to. IE... * Company &quo...
looking for web & email hosting provider - We are looking for suggestions on inexpensive web hosting & email hosting for a group of about 8 professionals. They really need it more on the email side vs having a website. It is more for shuttling docs between each other & clients. They are c...
email address posting on web page - i post people's email addresses on my home page - www.HomePokerGames.com. 1 kid told me he got alot of spam. Is there a way to post them without a spambot getting his address? |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|