Re: [Exim] Exim and MySQL

Top Page
Delete this message
Reply to this message
Author: Axel Hollanda
Date:  
To: exim-users
Subject: Re: [Exim] Exim and MySQL
Hi, Steve,

Steve Thomas wrote:

>I'm not familliar with qmail or that patch, but maybe this'll help with your migration. It's the relevant info from my exim running virtual users with MySQL. Most of this design was taken from a HOWTO I found online - I don't have the link anymore and have been unsuccessful in finding it again, so I can't point you to it.
>
>http://sthomas.net/misc/exim-mysql.txt
>
>
>

    Thanks for the tip, but I'm afraid it wont fulfill my needs. My
tables are a bit more complex than yours and it's all that patch's fault
(damn iain! heh). See, I have a table alias just like this:


+----------+-------+----------------+------------+
| username | alias | alias_username | alias_host |

+----------+-------+----------------+------------+
| alias    | xxx   | user1          |            |
| alias    | xxx   | user2          |            |
| alias    | xxx   | user1234      |            |

+----------+-------+----------------+------------+

Ok, here it's easy, when username='alias', alias surely isn't a real
user, and what about alias_username?

+----------+-----------------------+----------------+------------+
| username | alias                 | alias_username | alias_host |

+----------+-----------------------+----------------+------------+
| alias    | test_1    | xxx            |            |
| alias    | test_2     | xxx            |            |
| alias    | test_3 | xxx            |            |

+----------+-----------------------+----------------+------------+
this is a real situation using bogus user names, xxx is now alias_username

I think iain's patch do recursive lookups in that table until the
program is sure about the existence of the user on the databank.
And when the username is a real user?
alias table spits something like this:

+----------+------------+----------------+------------------------------------------------+
| username | alias      | alias_username |

alias_host                                     |
+----------+------------+----------------+------------------------------------------------+

| user1   |            | .              |

/Maildir/                                      |

| user1    |            | |              | /usr/local/bin/phpvacation

$HOME $SENDER user1 |
| user1    | anonymous  | .              |

/Maildir/.returnings/                          |

| user1    | postmaster | .              |

/Maildir/.postmaster/                          |

| user1    | lal        | .              |

/Maildir/.LAL/                                 |

| user1    | returnings | .              |

/Maildir/.returnings/                          |
+----------+------------+----------------+------------------------------------------------+


See the extension of my problem?

I really need help here, folks! :))

--
Axel Hollanda
ahollanda@???