hestiacp / hestiacp

Hestia Control Panel | A lightweight and powerful control panel for the modern web.
https://hestiacp.com
GNU General Public License v3.0
3.24k stars 676 forks source link

Email account profile #3978

Closed thepwnexperts closed 11 months ago

thepwnexperts commented 11 months ago

Describe the feature or change in detail

Not able to change profile pic of email account.

when sent to someone, it's like totally blank and not have option to add pic on email account profile pic

Would you like to sponsor this feature to have it implemented?

No

jaapmarcus commented 11 months ago

I don't this can be set with in Dovecot / Exim

Maybe it can be done via Roundcube but have no idea...

I assume you mean:

Screenshot 2023-09-02 at 21 03 20
jaapmarcus commented 11 months ago

https://customer.io/docs/journeys/adding-sender-image/

It can be done via BIMI but we don't have the possiblities to test it and implementation costs 1000 euro / domain...

I don't think this is possible for us to implement...

jaapmarcus commented 11 months ago

https://store.entrust.com/default/vmc.html and https://bimigroup.org/implementation-guide/

It can be done via DNS settings so no changes are required...

thepwnexperts commented 11 months ago

I did my research ,i will may help. exams are going on

need to create changes in sql and Dovecot Configuration

sql = >

UPDATE user_profiles
SET profile_picture = '/profile_pics/user123.jpg'
WHERE user_id = 123;

SQL Query Configuration (dovecot-sql.conf.ext):

# Define the SQL userdb driver and query
userdb {
    driver = sql
    args = /etc/dovecot/dovecot-sql.conf.ext
}

# Define the SQL passdb driver and query
passdb {
    driver = sql
    args = /etc/dovecot/dovecot-sql.conf.ext
}
driver = mysql
connect = host=localhost dbname=mydb user=myuser password=mypassword
default_pass_scheme = SHA512-CRYPT

password_query = SELECT username as user, password FROM user_profiles WHERE username = '%u'
user_query = SELECT home, uid, gid, profile_picture FROM user_profiles WHERE username = '%u'

chat gpt says

I apologize for any confusion. Here's an example of how you might configure Dovecot to serve profile pictures alongside user email accounts using a hypothetical database:

  1. Database Setup (Assuming MySQL):

    • Create a table to store user profiles, including the profile picture path:
    CREATE TABLE user_profiles (
       user_id INT PRIMARY KEY,
       username VARCHAR(50),
       profile_picture VARCHAR(255)
    );
  2. Database Update (Example SQL Command):

    • When a user uploads a profile picture, update the database:
    UPDATE user_profiles
    SET profile_picture = '/profile_pics/user123.jpg'
    WHERE user_id = 123;
  3. Dovecot Configuration:

    • In your Dovecot configuration (dovecot.conf or related files), you would need to specify where to find profile pictures. For example:
    # Define the SQL userdb driver and query
    userdb {
       driver = sql
       args = /etc/dovecot/dovecot-sql.conf.ext
    }
    
    # Define the SQL passdb driver and query
    passdb {
       driver = sql
       args = /etc/dovecot/dovecot-sql.conf.ext
    }
  4. SQL Query Configuration (dovecot-sql.conf.ext):

    • In this file, specify how Dovecot should query the database to fetch the profile picture path for each user:
    driver = mysql
    connect = host=localhost dbname=mydb user=myuser password=mypassword
    default_pass_scheme = SHA512-CRYPT
    
    password_query = SELECT username as user, password FROM user_profiles WHERE username = '%u'
    user_query = SELECT home, uid, gid, profile_picture FROM user_profiles WHERE username = '%u'
  5. Email Client Configuration:

    • On the email client side (e.g., Thunderbird), there shouldn't be a need for specific commands. Once Dovecot is configured to fetch profile picture paths from the database, the email client will display them automatically when viewing user profiles.

Please note that this is a simplified example and your actual configuration may vary based on your server setup and database system. Always ensure strong security practices when handling user data, especially profile pictures.

thepwnexperts commented 11 months ago

hope this may will help

thepwnexperts commented 11 months ago

this is the half research

thepwnexperts commented 11 months ago

I don't this can be set with in Dovecot / Exim

Maybe it can be done via Roundcube but have no idea...

I assume you mean: Screenshot 2023-09-02 at 21 03 20

ya this one

jaapmarcus commented 11 months ago

It will only work for internal email. And not for out going email and so on in that case BIMI is required.

Ideally we need to implement carddav but currently due to other time restrictions. We don't have the time for it...