[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116218":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":12,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":14,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":10,"rankLanguage":10,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":10,"pushedAt":31,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":14,"starSnapshotCount":14,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},116218,"claws-mail-reply-from-alias-plugin","mmeelix\u002Fclaws-mail-reply-from-alias-plugin","mmeelix","This plugin makes replying to an email to an alias email address easy. A mailbox might carry emails from multiple alias email addresses. This plugin makes replying with the correct email address easy.","",null,"C",70,69,0,45.54,"GNU General Public License v3.0",false,"main",true,[21,22,23,24,25,26,27,28,29,30],"alias","aliases","c","claws-mail","claws-mail-plugin","email","gtk3","mail-client","reply","smtp","2026-11-12 20:47:14","2026-11-18 05:37:53","# claws-replyfromalias\n\n**Reply in Claws Mail from the alias the message was sent to.**\n\nYou have one real mailbox and several addresses on it (`sales@…`, `jobs@…`, `hi@…`). A reply should leave as the address the sender wrote to, not the mailbox address.\n\nSMTP login stays the real mailbox either way. The mail server still has to allow that From (Gmail calls this **Send mail as**). Neither the built-in method nor this plugin can override a server that rewrites From.\n\nClaws Mail already does this, if you are willing to give each alias its own folder. That has been in the folder Properties dialog since **4.1.0 \u002F 3.19.0** (3 April 2022). It is easy to miss: it is not under Preferences, and it is not an account setting. Use that. Build this plugin only if those folders are a problem for you.\n\n| | Built-in | This plugin |\n|---|---|---|\n| Since | Claws Mail 4.1.0 | Written against 4.3.1 |\n| How | One folder per alias, From set on that folder | One text file, matched from the original headers |\n| Inbox stays mixed | No. Mail has to land in the alias folder | Yes |\n| Extra accounts | No | No |\n| Compile anything | No | Yes, against your Claws source tree |\n\n---\n\n## The built-in way (do this first)\n\nConfirmed on the Claws Mail users list, and in the [4.1.0 NEWS](https:\u002F\u002Fwww.claws-mail.org\u002FNEWS): *'Default From:' has been added to the Compose page of the folder Properties. This allows setting an email address which will override the Account's email address.*\n\n### 1. Make a folder for the alias\n\nIn the folder tree of the IMAP account, create a folder. One folder per alias. Name it after the address if that helps you (`sales`, `jobs`).\n\n### 2. File that alias's mail into the folder\n\n**Configuration → Filtering → Define…**\n\nA quick start: select a message that arrived at the alias, then **Tools → Create filter rule → Automatically → by To**. Edit the rule so the action is **Move** into the folder you just made. Add the rule.\n\nMatch the address people write to. `To` is the usual header. If your provider writes the real recipient somewhere else, match that header instead (`Delivered-To`, `X-Original-To`, `Envelope-To`). A catch-all often arrives with your mailbox address in `To` and the alias only in `Delivered-To`. A rule on `To` will miss those.\n\nTurn on filtering when mail arrives: **Configuration → Preferences → Receive → \"Filter messages on receiving\"**. On an IMAP account you can also filter with a sieve rule on the server, if the provider offers one. Server-side filtering still works when Claws is not running.\n\nRule order matters. A later move never sees a message an earlier rule already moved.\n\n### 3. Set From on that folder\n\nRight-click the folder → **Properties** → **Compose**.\n\nTick **Default From:** and enter the alias:\n\n```\nExample Sales \u003Csales@example.com>\n```\n\n**Apply to subfolders** if you file under that folder and still want the same From.\n\nOK.\n\nReply to a message **in that folder** (or compose while the folder is selected). From should be the alias. Send one to yourself and read the From on the copy you receive. The compose window can look right while the server still substitutes the mailbox address.\n\nRepeat for each alias.\n\n### What this does not do\n\n- It does not pick the alias from the message. It picks the From of the **folder the message is in**. Leave the mail in the Inbox and the reply uses the Inbox's From, which is the account address unless you set one there too.\n- One folder cannot mean two aliases. A message addressed to both `sales@` and `jobs@` has to live in one folder, so it gets that folder's From.\n- The account dropdown still lists accounts, not aliases. **Default From** overrides the address. It does not add a row.\n\n---\n\n## Who the plugin is for\n\nYou want the alias From, and you do not want a folder per alias.\n\nTypical case: a catch-all, or a handful of aliases, and you want those messages to stay in the Inbox next to everything else. The plugin opens the message you are replying to, finds the alias in the headers, and writes From. The folder does not matter.\n\nYou do not need the plugin if:\n\n- A folder per alias is fine. Use the section above.\n- Every address is already its own Claws account. Claws replies from that account on its own.\n\n| | |\n|---|---|\n| Plugin name in Claws | Reply From Alias |\n| File you load | `claws-replyfromalias.so` |\n| Tested on | Claws Mail 4.3.1, Debian 13, reply only |\n| License | [GPL-3.0-or-later](LICENSE) (same family as Claws Mail) |\n| Config | `~\u002F.claws-mail\u002Fclaws-replyfromaliasrc` |\n| Log | `~\u002F.claws-mail\u002Fclaws-replyfromalias.log` |\n\nDo not run both on the same folder. The plugin writes From again at Send, so a folder **Default From** and a plugin match can fight. Use the plugin on the mixed inbox. Leave it unloaded if the folders already do what you want.\n\nIt does not add rows to the account dropdown. It does not change which account sends. It writes the From field.\n\n---\n\n## What you need before you start\n\n1. **Claws Mail 4.x**, same major line as 4.3.1. This plugin was written and used against **4.3.1**.\n2. A C compiler and the GTK 3 headers (`build-essential`, `pkg-config`, `libgtk-3-dev`).\n3. The **Claws Mail source tree that matches the binary you run**, with `.\u002Fconfigure` already done so `config.h` exists.\n4. Permission on the server to send as each alias.\n\nThe plugin reads private Claws structs (`Compose`, `PrefsAccount`). A `.so` built against a different Claws than the one you run can crash on reply. Build against the source for *your* binary. There is no generic prebuilt `.so` in this repo for that reason.\n\n---\n\n## Install (Debian, Ubuntu, and close relatives)\n\n### 1. Install build tools and get the Claws source\n\n```bash\nsudo apt update\nsudo apt install build-essential pkg-config libgtk-3-dev\nsudo apt build-dep claws-mail\napt source claws-mail\n```\n\n`apt source` drops a directory such as `claws-mail-4.3.1` in the current folder. Use the version that matches `claws-mail --version`.\n\nIf your Claws came from source you built yourself, skip `apt source` and point `CLAWS_SRC` at that tree instead.\n\n### 2. Configure that tree (headers only — you are not replacing Claws)\n\n```bash\ncd claws-mail-4.3.1\n.\u002Fconfigure\ncd ..\n```\n\n`.\u002Fconfigure` can take a few minutes. You need it so `config.h` and `claws-features.h` exist. You do not need to `make` or `make install` Claws itself.\n\n### 3. Build the plugin\n\n```bash\ncd claws-replyfromalias\nmake CLAWS_SRC=\u002Fabsolute\u002Fpath\u002Fto\u002Fclaws-mail-4.3.1\n```\n\nYou should get `claws-replyfromalias.so` in this directory.\n\nUndefined-symbol warnings at link time are normal. Those symbols resolve when Claws loads the plugin. Do not add `-Wl,--no-undefined`.\n\n### 4. Quit Claws, then copy the plugin in\n\nA running Claws keeps the old `.so` in memory. Quit it fully. `pgrep -a claws` should print nothing.\n\n```bash\nls \u002Fusr\u002Flocal\u002Flib\u002Fclaws-mail\u002Fplugins \u002Fusr\u002Flib\u002Fclaws-mail\u002Fplugins\nsudo mkdir -p \u002Fusr\u002Flocal\u002Flib\u002Fclaws-mail\u002Fplugins\nsudo cp claws-replyfromalias.so \u002Fusr\u002Flocal\u002Flib\u002Fclaws-mail\u002Fplugins\u002F\n```\n\nUse the directory your Claws actually scans. Distro packages often use `\u002Fusr\u002Flib\u002Fclaws-mail\u002Fplugins`. A Claws you installed from source often uses `\u002Fusr\u002Flocal\u002Flib\u002Fclaws-mail\u002Fplugins`.\n\n### 5. Load it\n\nStart Claws.\n\n**Configuration → Plugins → Load…** and pick `claws-replyfromalias.so`, if it did not appear on its own.\n\nOpen `~\u002F.claws-mail\u002Fclaws-replyfromalias.log`. The first line must be:\n\n```\nclaws-replyfromalias 1.0.0 loaded\n```\n\nIf that line is missing, Claws was still running when you copied the file, or it loaded a different directory.\n\nThe first load also writes a commented sample config if `~\u002F.claws-mail\u002Fclaws-replyfromaliasrc` does not exist yet.\n\n---\n\n## Tell it your aliases\n\nEdit `~\u002F.claws-mail\u002Fclaws-replyfromaliasrc`. One alias per line. Three columns, separated by `|`:\n\n```\nsales@example.com | me@example.com | Example Sales\njobs@example.com  | me@example.com | Example Jobs\nhi@personal.net   | me@personal.net | Me\n```\n\n| Column | What to put |\n|---|---|\n| Alias | The address people write *to*. Case does not matter. |\n| Mailbox address | The **Mail address** of the Claws account that receives it. Configuration → Edit accounts → the account → **Mail address**. Not the SMTP username, unless those happen to be the same string. |\n| Display name | Optional. The name only, such as `Example Sales`. Leave it empty to keep the account's name. |\n\nBlank lines and lines starting with `#` are ignored.\n\nSave the file. You do not restart Claws. The next reply reads it again.\n\n**Why the middle column matters.** It stops a reply you are writing from a different mailbox from being rewritten to an alias that belongs somewhere else. Set it.\n\n**Plus-addresses are separate.** `sales+tickets@example.com` is not treated as `sales@example.com`. Add the plus-address as its own line if you want it.\n\nA full commented copy of this format is in [`claws-replyfromaliasrc.example`](claws-replyfromaliasrc.example).\n\n---\n\n## Allow the alias on the mail server\n\nThe plugin only changes the From header Claws sends. The server can still replace it with the real mailbox address.\n\n- **Gmail \u002F Google Workspace:** Settings → Accounts → **Send mail as** → add each alias and confirm it.\n- **Other providers:** look for \"aliases\", \"identities\", or \"send as\". If the provider forbids other From addresses, this plugin cannot override that.\n\n---\n\n## Check that it worked\n\n1. Reply to a message that arrived at an alias. The From field should show `Example Sales \u003Csales@example.com>`.\n2. Send that reply to yourself. The message you receive must have From set to the alias. The mailbox account is still what authenticated.\n3. Reply to a message that was sent only to the mailbox address. From stays the mailbox.\n4. The log should grow by one line:\n\n```\nFrom me@example.com -> sales@example.com\n```\n\nEditing From by hand in that reply window is overwritten when you press Send. Close the window and start a new message (not a reply) if you want a different address this once. Switching the account dropdown in that same window is also overwritten on Send. That second write is what makes the sent message match the alias.\n\n---\n\n## If it does nothing\n\n| What you see | What it means |\n|---|---|\n| Log has no `claws-replyfromalias 1.0.0 loaded` | Plugin is not loaded, or Claws was still running when you copied the `.so`. Quit, copy again, start. |\n| Loaded line only, nothing on reply | This Claws build uses different hook names. See [NOTES.md](NOTES.md). A hook can \"register\" and still never run. |\n| `skipped … alias belongs to` | Middle column does not match that account's Mail address. Copy it from Edit accounts. |\n| Compose shows the alias, the mail you receive shows the mailbox | The server replaced From. Fix Send mail as. The plugin cannot. |\n| `claws-replyfromaliasrc has no aliases` | Every line is still a comment, or a line was rejected (no `@`, or spaces inside the address). |\n| Crash when you reply | The `.so` was built against a different Claws than the one running. Unload the plugin, rebuild against this binary's source, load it again. |\n\n---\n\n## Debug switch\n\nOff unless you turn it on. Either of these enables a short trace:\n\nPut this line in `claws-replyfromaliasrc` (picked up on the next reply, no restart):\n\n```\ndebug\n```\n\nOr, for one session only:\n\n```bash\nCLAWS_REPLYFROMALIAS_DEBUG=1 claws-mail\n```\n\n`debug=off` turns the file switch off. If the environment variable is set to anything other than `0`, `off`, `no`, or `false`, debug stays on.\n\nQuiet log is one line on load and one line per rewritten reply. Debug lines are marked with `D`. They name the header that matched (`Delivered-To`, `To`, `Received`, …). They do not dump header bodies.\n\nThe log still contains email addresses. Trim it before you paste it into a public issue. At 512 KB it rotates to `claws-replyfromalias.log.old`.\n\n---\n\n## After you upgrade Claws\n\n1. Unload the plugin (**Configuration → Plugins**).\n2. Upgrade Claws.\n3. Get the new source tree, run `.\u002Fconfigure` in it.\n4. `make CLAWS_SRC=\u002Fpath\u002Fto\u002Fnew-tree` and copy the new `.so` in (Claws quit).\n5. Load the plugin. Confirm the log shows `claws-replyfromalias 1.0.0 loaded`, then send one reply to yourself.\n\nIf reply crashes, or the log stays silent after the load line, the private structs or hook names moved. [NOTES.md](NOTES.md) has the greps and the list of things that already broke once.\n\n---\n\n## What it matches, in order\n\nIt opens the message you are replying to and scans headers. First hit wins. Inside one header, the order of lines in the config file wins.\n\n1. `Delivered-To`, `Envelope-To`, `X-Original-To`, `X-Envelope-To`, `X-Delivered-To`, `X-Rcpt-To`, `Original-Recipient`\n2. `To`, `Cc`, `Bcc`, `Apparently-To`, `Resent-To`\n3. `Received` lines that say `for \u003Calias>`\n4. The summary To\u002FCc Claws already parsed (fallback)\n\n`Delivered-To` is what matched in testing. The summary alone is not enough for Bcc.\n\nForward and redirect were not tested. If a forward has no reply target, the plugin leaves From alone.\n\n---\n\n## Files in this repo\n\n| File | What it is |\n|---|---|\n| `claws-replyfromalias.c` | The plugin |\n| `Makefile` | Build and install |\n| `claws-replyfromaliasrc.example` | Config format, with comments |\n| `NOTES.md` | Port notes for the next Claws upgrade |\n| `LICENSE` | GPL-3.0-or-later |\n\n---\n\n## Keywords\n\nClaws Mail plugin, reply from alias, reply from the address it was sent to, catch-all reply From, plus address, Send mail as, multiple addresses one mailbox, identity on reply.\n","这是一个为 Claws Mail 邮件客户端设计的插件，用于在回复邮件时自动使用原始收件所用的别名地址（如 sales@、jobs@）作为发件人，而非默认邮箱主地址。其核心功能是通过解析原始邮件头（如 To、Delivered-To 等字段）匹配预设的别名映射规则，实现单收件箱混合存放下精准的 From 地址选择；技术上基于 C 语言开发，需编译适配 Claws Mail 源码，依赖 GTK3 和 SMTP 发信机制。适用于拥有多个对外别名但仅维护一个 IMAP 收件箱的中小团队或个人用户，尤其当内置的“每别名建文件夹+文件夹级 Default From”方案不适用时（如需保持收件箱完全混合、避免文件夹冗余）。",2,"2026-11-24 04:53:11","CREATED_QUERY"]